Class ThreadpoolSwiftlet

java.lang.Object
com.swiftmq.swiftlet.Swiftlet
com.swiftmq.swiftlet.threadpool.ThreadpoolSwiftlet

public abstract class ThreadpoolSwiftlet extends Swiftlet
The ThreadpoolSwiftlet manages threads of a SwiftMQ router.
Author:
IIT GmbH, Bremen/Germany, Copyright (c) 2000-2005, All Rights Reserved
  • Constructor Details

    • ThreadpoolSwiftlet

      public ThreadpoolSwiftlet()
  • Method Details

    • runAsync

      public abstract CompletableFuture<?> runAsync(Runnable r)
      Executes a Runnable in a separate virtual thread.
      Parameters:
      r - Runnable
      Returns:
      Future to track completion
    • runAsync

      public abstract CompletableFuture<?> runAsync(Runnable r, boolean virtual)
      Executes a Runnable in a separate virtual or platform thread.
      Parameters:
      r - Runnable
      virtual - If true, uses a virtual, if false, uses a platform thread
      Returns:
      Future to track completion
    • createEventLoop

      public abstract EventLoop createEventLoop(String id, EventProcessor processor)
      Create a new event loop.
      Parameters:
      id - id of the client
      processor - The processor that executes the tasks
      Returns:
      A new Event Loop
    • freeze

      public abstract void freeze()
      Freeze all event loops and async thread pools.
    • unfreeze

      public abstract void unfreeze()
      Unfreeze all event loops and async thread pools.