Package org.redisson.remote
Class BaseRemoteService
- java.lang.Object
-
- org.redisson.remote.BaseRemoteService
-
- Direct Known Subclasses:
RedissonRemoteService
,TasksService
public abstract class BaseRemoteService extends Object
- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description protected String
cancelRequestMapName
protected String
cancelResponseMapName
protected Codec
codec
protected CommandAsyncExecutor
commandExecutor
protected String
executorId
protected String
name
protected String
responseQueueName
-
Constructor Summary
Constructors Constructor Description BaseRemoteService(Codec codec, String name, CommandAsyncExecutor commandExecutor, String executorId, ConcurrentMap<String,ResponseEntry> responses)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract RFuture<Boolean>
addAsync(String requestQueueName, RemoteServiceRequest request, RemotePromise<Object> result)
protected io.netty.buffer.ByteBuf
encode(Object obj)
protected RequestId
generateRequestId()
<T> T
get(Class<T> remoteInterface)
<T> T
get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit)
<T> T
get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit, long ackTimeout, TimeUnit ackTimeUnit)
<T> T
get(Class<T> remoteInterface, RemoteInvocationOptions options)
protected String
getAckName(String requestId)
protected String
getAckName(RequestId requestId)
protected <K,V>
RMap<K,V>getMap(String name)
protected long[]
getMethodSignature(Method method)
String
getRequestQueueName(Class<?> remoteInterface)
String
getResponseQueueName(String executorId)
protected long
getTimeout(Long executionTimeoutInMillis, RemoteServiceRequest request)
protected abstract RFuture<Boolean>
removeAsync(String requestQueueName, RequestId taskId)
protected <T> void
scheduleCheck(String mapName, RequestId requestId, RPromise<T> cancelRequest)
-
-
-
Field Detail
-
codec
protected final Codec codec
-
name
protected final String name
-
commandExecutor
protected final CommandAsyncExecutor commandExecutor
-
executorId
protected final String executorId
-
cancelRequestMapName
protected final String cancelRequestMapName
-
cancelResponseMapName
protected final String cancelResponseMapName
-
responseQueueName
protected final String responseQueueName
-
-
Constructor Detail
-
BaseRemoteService
public BaseRemoteService(Codec codec, String name, CommandAsyncExecutor commandExecutor, String executorId, ConcurrentMap<String,ResponseEntry> responses)
-
-
Method Detail
-
encode
protected io.netty.buffer.ByteBuf encode(Object obj)
-
get
public <T> T get(Class<T> remoteInterface)
-
get
public <T> T get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit, long ackTimeout, TimeUnit ackTimeUnit)
-
get
public <T> T get(Class<T> remoteInterface, RemoteInvocationOptions options)
-
getTimeout
protected long getTimeout(Long executionTimeoutInMillis, RemoteServiceRequest request)
-
scheduleCheck
protected <T> void scheduleCheck(String mapName, RequestId requestId, RPromise<T> cancelRequest)
-
generateRequestId
protected RequestId generateRequestId()
-
addAsync
protected abstract RFuture<Boolean> addAsync(String requestQueueName, RemoteServiceRequest request, RemotePromise<Object> result)
-
removeAsync
protected abstract RFuture<Boolean> removeAsync(String requestQueueName, RequestId taskId)
-
getMethodSignature
protected long[] getMethodSignature(Method method)
-
-