Refine search
private Object invokeAndGetData(QueueOperation operation) { final NodeEngine nodeEngine = getNodeEngine(); try { OperationService operationService = nodeEngine.getOperationService(); Future f = operationService.invokeOnPartition(QueueService.SERVICE_NAME, operation, partitionId); return f.get(); } catch (Throwable throwable) { throw ExceptionUtil.rethrow(throwable); } }
private Object invokeAndGetData(QueueOperation operation) { final NodeEngine nodeEngine = getNodeEngine(); try { OperationService operationService = nodeEngine.getOperationService(); Future f = operationService.invokeOnPartition(QueueService.SERVICE_NAME, operation, partitionId); return f.get(); } catch (Throwable throwable) { throw ExceptionUtil.rethrow(throwable); } }
private <T, E extends Throwable> T invokeAndGet(QueueOperation operation, Class<E> allowedException) throws E { final NodeEngine nodeEngine = getNodeEngine(); try { Future f = invoke(operation); return (T) nodeEngine.toObject(f.get()); } catch (Throwable throwable) { throw ExceptionUtil.rethrow(throwable, allowedException); } }
private long nextId(Data key) { TxnGenerateRecordIdOperation operation = new TxnGenerateRecordIdOperation(name, key); try { int partitionId = partitionService.getPartitionId(key); Future<Long> future = operationService.invokeOnPartition(MultiMapService.SERVICE_NAME, operation, partitionId); return future.get(); } catch (Throwable t) { throw rethrow(t); } }
private <T, E extends Throwable> T invokeAndGet(QueueOperation operation, Class<E> allowedException) throws E { final NodeEngine nodeEngine = getNodeEngine(); try { Future f = invoke(operation); return (T) nodeEngine.toObject(f.get()); } catch (Throwable throwable) { throw ExceptionUtil.rethrow(throwable, allowedException); } }
@Override public Object invokeOnAllPartitions(Object request) { try { ClientMessage clientRequest = (ClientMessage) request; final Future future = new ClientInvocation(getClient(), clientRequest, null).invoke(); Object result = future.get(); return context.toObject(result); } catch (Exception e) { throw rethrow(e); } }
protected void loadAllInternal(boolean replaceExistingValues) { int mapNamePartition = partitionService.getPartitionId(name); Operation operation = operationProvider.createLoadMapOperation(name, replaceExistingValues); Future loadMapFuture = operationService.invokeOnPartition(SERVICE_NAME, operation, mapNamePartition); try { loadMapFuture.get(); waitUntilLoaded(); } catch (Throwable t) { throw rethrow(t); } }
@Override public Object invokeOnAllPartitions(Object request) { try { ClientMessage clientRequest = (ClientMessage) request; final Future future = new ClientInvocation(getClient(), clientRequest, null).invoke(); Object result = future.get(); return context.toObject(result); } catch (Exception e) { throw rethrow(e); } }