@Override public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { serializationService = ((SerializationServiceSupport) hazelcastInstance).getSerializationService(); } }
/** * Returns: * <ul> * <li>null - if cancelled or not done</li> * <li>result - if done and result is NOT Throwable</li> * <li>sneaky throws an exception - if done and result is Throwable</li> * </ul> */ protected V getResult() { return getResult(this.state); }
/** * Returns {@code true} if the operation allows checking for quorum, * {@code false} if the quorum check does not apply to this operation. */ private static boolean shouldCheckQuorum(Operation op) { return !(op instanceof QuorumCheckAwareOperation) || ((QuorumCheckAwareOperation) op).shouldCheckQuorum(); }
@Override public String toString() { Object state = getState(); if (isDone(state)) { return "InvocationFuture{invocation=" + invocationToString() + ", value=" + state + '}'; } else { return "InvocationFuture{invocation=" + invocationToString() + ", done=false}"; } }
public DurableExecutorContainer(NodeEngineImpl nodeEngine, String name, int partitionId, int durability, TaskRingBuffer ringBuffer) { this.name = name; this.nodeEngine = nodeEngine; this.executionService = nodeEngine.getExecutionService(); this.partitionId = partitionId; this.logger = nodeEngine.getLogger(DurableExecutorContainer.class); this.durability = durability; this.ringBuffer = ringBuffer; }
public AbstractPartitionPrimaryReplicaAntiEntropyTask(NodeEngineImpl nodeEngine, int partitionId) { this.nodeEngine = nodeEngine; this.partitionService = (InternalPartitionServiceImpl) nodeEngine.getPartitionService(); this.partitionId = partitionId; }
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event, Collection<ServiceNamespace> namespaces) { return migrationAwareService.prepareReplicationOperation(event, namespaces); }
@Override public boolean setResult(Object result) { return super.setResult(result); } }
@Override public E get(final long timeout, final TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { // assert (!Thread.currentThread().getName().contains("client.thread")); return super.get(timeout, unit); } }
@Override public void onExecutionFailure(Throwable e) { // Execution failed so we should enable `returnsResponse` flag to prevent waiting anymore returnsResponse = true; super.onExecutionFailure(e); }
private void runAsynchronous(ExecutionCallbackNode head, Object result) { while (head != INITIAL_STATE) { runAsynchronous(head.callback, head.executor, result); head = head.next; } }
@Override public final void onFailure(Throwable t) { notify(t); } }
@Override public String toString() { Object state = getState(); if (isDone(state)) { return "InvocationFuture{invocation=" + invocationToString() + ", value=" + state + '}'; } else { return "InvocationFuture{invocation=" + invocationToString() + ", done=false}"; } }
@Override public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { serializationService = ((SerializationServiceSupport) hazelcastInstance).getSerializationService(); } }
/** * Returns: * <ul> * <li>null - if cancelled or not done</li> * <li>result - if done and result is NOT Throwable</li> * <li>sneaky throws an exception - if done and result is Throwable</li> * </ul> */ protected V getResult() { return getResult(this.state); }
public AbstractPartitionPrimaryReplicaAntiEntropyTask(NodeEngineImpl nodeEngine, int partitionId) { this.nodeEngine = nodeEngine; this.partitionService = (InternalPartitionServiceImpl) nodeEngine.getPartitionService(); this.partitionId = partitionId; }
@Override public Operation prepareReplicationOperation(PartitionReplicationEvent event, Collection<ServiceNamespace> namespaces) { return migrationAwareService.prepareReplicationOperation(event, namespaces); }
@Override public boolean setResult(Object result) { return super.setResult(result); } }
@Override public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { serializationService = ((SerializationServiceSupport) hazelcastInstance).getSerializationService(); } }
@Override public void setHazelcastInstance(HazelcastInstance hazelcastInstance) { serializationService = ((SerializationServiceSupport) hazelcastInstance).getSerializationService(); } }