public class RedissonRemoteService extends Object implements RRemoteService
Constructor and Description |
---|
RedissonRemoteService(Codec codec,
Redisson redisson,
CommandExecutor commandExecutor) |
RedissonRemoteService(Codec codec,
Redisson redisson,
String name,
CommandExecutor commandExecutor) |
RedissonRemoteService(Redisson redisson,
CommandExecutor commandExecutor) |
RedissonRemoteService(Redisson redisson,
String name,
CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(Class<T> remoteInterface)
Get remote service object for remote invocations.
|
<T> T |
get(Class<T> remoteInterface,
long executionTimeout,
TimeUnit executionTimeUnit)
Get remote service object for remote invocations
with specified invocation timeout.
|
<T> T |
get(Class<T> remoteInterface,
long executionTimeout,
TimeUnit executionTimeUnit,
long ackTimeout,
TimeUnit ackTimeUnit)
Get remote service object for remote invocations
with specified invocation and ack timeouts
This method is a shortcut for
get(remoteInterface, RemoteInvocationOptions.defaults()
.expectAckWithin(ackTimeout, ackTimeUnit)
.expectResultWithin(executionTimeout, executionTimeUnit))
|
<T> T |
get(Class<T> remoteInterface,
RemoteInvocationOptions options)
Get remote service object for remote invocations
with the specified options
Note that when using the noResult() option,
it is expected that the invoked method returns void,
or else IllegalArgumentException will be thrown.
|
<T> void |
register(Class<T> remoteInterface,
T object)
Register remote service with single executor
|
<T> void |
register(Class<T> remoteInterface,
T object,
int executorsAmount)
Register remote service with custom executors amount
|
public RedissonRemoteService(Redisson redisson, CommandExecutor commandExecutor)
public RedissonRemoteService(Redisson redisson, String name, CommandExecutor commandExecutor)
public RedissonRemoteService(Codec codec, Redisson redisson, CommandExecutor commandExecutor)
public RedissonRemoteService(Codec codec, Redisson redisson, String name, CommandExecutor commandExecutor)
public <T> void register(Class<T> remoteInterface, T object)
RRemoteService
register
in interface RRemoteService
public <T> void register(Class<T> remoteInterface, T object, int executorsAmount)
RRemoteService
register
in interface RRemoteService
public <T> T get(Class<T> remoteInterface)
RRemoteService
get(remoteInterface, RemoteInvocationOptions.defaults())
get
in interface RRemoteService
RemoteInvocationOptions.defaults()
,
RRemoteService.get(Class, RemoteInvocationOptions)
public <T> T get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit)
RRemoteService
get(remoteInterface, RemoteInvocationOptions.defaults() .expectResultWithin(executionTimeout, executionTimeUnit))
get
in interface RRemoteService
executionTimeout
- - invocation timeoutRemoteInvocationOptions.defaults()
,
RRemoteService.get(Class, RemoteInvocationOptions)
public <T> T get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit, long ackTimeout, TimeUnit ackTimeUnit)
RRemoteService
get(remoteInterface, RemoteInvocationOptions.defaults() .expectAckWithin(ackTimeout, ackTimeUnit) .expectResultWithin(executionTimeout, executionTimeUnit))
get
in interface RRemoteService
executionTimeout
- - invocation timeoutackTimeout
- - ack timeoutRemoteInvocationOptions
,
RRemoteService.get(Class, RemoteInvocationOptions)
public <T> T get(Class<T> remoteInterface, RemoteInvocationOptions options)
RRemoteService
get
in interface RRemoteService
RemoteInvocationOptions
Copyright © 2014–2016. All rights reserved.