public abstract class BaseRemoteService extends Object
Modifier and Type | Field and Description |
---|---|
protected Codec |
codec |
protected CommandAsyncExecutor |
commandExecutor |
protected String |
executorId |
protected String |
name |
protected RedissonClient |
redisson |
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 RFuture<Boolean> |
addAsync(RBlockingQueue<RemoteServiceRequest> requestQueue,
RemoteServiceRequest request,
RemotePromise<Object> result) |
protected void |
awaitResultAsync(RemoteInvocationOptions optionsCopy,
RemotePromise<Object> result,
RemoteServiceRequest request,
String responseName) |
protected io.netty.buffer.ByteBuf |
encode(Object obj) |
protected String |
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(Class<?> remoteInterface,
String requestId) |
protected String |
getCancelRequestMapName(Class<?> remoteInterface) |
protected String |
getCancelResponseMapName(Class<?> remoteInterface) |
protected List<String> |
getMethodSignatures(Method method) |
protected String |
getRequestQueueName(Class<?> remoteInterface) |
protected String |
getResponseQueueName(Class<?> remoteInterface,
String executorId) |
protected RFuture<Boolean> |
removeAsync(RBlockingQueue<RemoteServiceRequest> requestQueue,
RemoteServiceRequest request) |
protected <T> void |
scheduleCheck(String mapName,
String requestId,
RPromise<T> cancelRequest) |
protected final Codec codec
protected final RedissonClient redisson
protected final String name
protected final CommandAsyncExecutor commandExecutor
protected final String executorId
public BaseRemoteService(Codec codec, RedissonClient redisson, String name, CommandAsyncExecutor commandExecutor, String executorId, ConcurrentMap<String,ResponseEntry> responses)
protected String getResponseQueueName(Class<?> remoteInterface, String executorId)
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, RemoteServiceRequest request, String responseName)
protected <T> void scheduleCheck(String mapName, String requestId, RPromise<T> cancelRequest)
protected String generateRequestId()
protected RFuture<Boolean> addAsync(RBlockingQueue<RemoteServiceRequest> requestQueue, RemoteServiceRequest request, RemotePromise<Object> result)
protected RFuture<Boolean> removeAsync(RBlockingQueue<RemoteServiceRequest> requestQueue, RemoteServiceRequest request)
Copyright © 2014–2017 The Redisson Project. All rights reserved.