public abstract class BaseRemoteService extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
cancelRequestMapName |
protected String |
cancelResponseMapName |
protected Codec |
codec |
protected CommandAsyncExecutor |
commandExecutor |
protected String |
executorId |
protected String |
name |
protected String |
responseQueueName |
Constructor and Description |
---|
BaseRemoteService(Codec codec,
String name,
CommandAsyncExecutor commandExecutor,
String executorId,
ConcurrentMap<String,ResponseEntry> responses) |
Modifier and Type | Method and 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(RequestId requestId) |
protected String |
getAckName(String 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) |
protected final Codec codec
protected final String name
protected final CommandAsyncExecutor commandExecutor
protected final String executorId
protected final String cancelRequestMapName
protected final String cancelResponseMapName
protected final String responseQueueName
public BaseRemoteService(Codec codec, String name, CommandAsyncExecutor commandExecutor, String executorId, ConcurrentMap<String,ResponseEntry> responses)
protected io.netty.buffer.ByteBuf encode(Object obj)
public <T> T get(Class<T> remoteInterface)
public <T> T get(Class<T> remoteInterface, long executionTimeout, TimeUnit executionTimeUnit, long ackTimeout, TimeUnit ackTimeUnit)
public <T> T get(Class<T> remoteInterface, RemoteInvocationOptions options)
protected long getTimeout(Long executionTimeoutInMillis, RemoteServiceRequest request)
protected <T> void scheduleCheck(String mapName, RequestId requestId, RPromise<T> cancelRequest)
protected RequestId generateRequestId()
protected abstract RFuture<Boolean> addAsync(String requestQueueName, RemoteServiceRequest request, RemotePromise<Object> result)
protected abstract RFuture<Boolean> removeAsync(String requestQueueName, RequestId taskId)
protected long[] getMethodSignature(Method method)
Copyright © 2014–2020 Redisson. All rights reserved.