Class MsgModuleClient<O>

java.lang.Object
com.scaleoutsoftware.modules.client.MsgModuleClient<O>
Type Parameters:
O - the SOSS object type.

public class MsgModuleClient<O> extends Object
The MsgModuleClient is used to send messages to a client and access the underlying module cache.
  • Method Details

    • sendToModule

      public CompletableFuture<Void> sendToModule(String objectId, byte[] message)
      Sends a messages to a module with a default timeout of 5 seconds.
      Parameters:
      objectId - the unique SOSS object id.
      message - the serialized message.
      Returns:
      a CompletableFuture that returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported.
    • sendToModule

      public CompletableFuture<Void> sendToModule(String objectId, byte[] message, Duration timeout)
      Sends a messages to a module with a configurable timeout.
      Parameters:
      objectId - the unique SOSS object id.
      message - the serialized message.
      timeout - the duration of time in seconds before a timeout occurs.
      Returns:
      a CompletableFuture that returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported
    • getCacheForModule

      public com.scaleout.client.caching.Cache<String,O> getCacheForModule()
      Retrieve the underlying Cache for this module.
      Returns:
      the underlying Cache.