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 StringcancelRequestMapNameprotected StringcancelResponseMapNameprotected Codeccodecprotected CommandAsyncExecutorcommandExecutorprotected StringexecutorIdprotected Stringnameprotected StringresponseQueueName
-
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.ByteBufencode(Object obj)protected RequestIdgenerateRequestId()<T> Tget(Class<T> remoteInterface)<T> Tget(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit)<T> Tget(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit, long ackTimeout, TimeUnit ackTimeUnit)<T> Tget(Class<T> remoteInterface, RemoteInvocationOptions options)protected StringgetAckName(String requestId)protected StringgetAckName(RequestId requestId)protected <K,V>
RMap<K,V>getMap(String name)protected long[]getMethodSignature(Method method)StringgetRequestQueueName(Class<?> remoteInterface)StringgetResponseQueueName(String executorId)protected longgetTimeout(Long executionTimeoutInMillis, RemoteServiceRequest request)protected abstract RFuture<Boolean>removeAsync(String requestQueueName, RequestId taskId)protected <T> voidscheduleCheck(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)
-
-