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 RedissonClient |
redisson |
protected String |
responseQueueName |
Constructor and Description |
---|
BaseRemoteService(Codec codec,
RedissonClient redisson,
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 void |
awaitResultAsync(RemoteInvocationOptions optionsCopy,
RemotePromise<Object> result,
RFuture<RRemoteServiceResponse> responseFuture) |
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 List<String> |
getMethodSignatures(Method method) |
String |
getRequestQueueName(Class<?> remoteInterface) |
String |
getResponseQueueName(String executorId) |
protected <T extends RRemoteServiceResponse> |
pollResultResponse(long timeout,
RequestId requestId,
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 RedissonClient redisson
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, RedissonClient redisson, 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 void awaitResultAsync(RemoteInvocationOptions optionsCopy, RemotePromise<Object> result, RFuture<RRemoteServiceResponse> responseFuture)
protected <T extends RRemoteServiceResponse> RPromise<T> pollResultResponse(long timeout, RequestId requestId, 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)
Copyright © 2014–2019 The Redisson Project. All rights reserved.