Class MsgModuleClient<O>
java.lang.Object
com.scaleoutsoftware.modules.client.MsgModuleClient<O>
- Type Parameters:
O- the SOSS object type.
The MsgModuleClient is used to send messages to a client and access the underlying module cache.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the underlyingCachefor this module.sendToModule(String objectId, byte[] message) Sends a messages to a module with a default timeout of 5 seconds.sendToModule(String objectId, byte[] message, Duration timeout) Sends a messages to a module with a configurable timeout.
-
Method Details
-
sendToModule
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
CompletableFuturethat returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported.
-
sendToModule
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
CompletableFuturethat returns null upon successful completion. If an exception occurs in message processing or the request times out, an exception is reported
-
getCacheForModule
Retrieve the underlyingCachefor this module.- Returns:
- the underlying
Cache.
-