/** * @param sndId Sender node ID. * @param reqId Request ID. * @return Recipient ID. */ private static Object recipient(UUID sndId, long reqId) { assert sndId != null; return new IgniteBiTuple<>(sndId, reqId); }
/** {@inheritDoc} */ @Override public void onCompletion() { assert lsnr != null; lsnr.apply(null, null); }
/** {@inheritDoc} */ @Override protected boolean accept(IgniteBiTuple<WALPointer, WALRecord> tup) { return !(tup.get2() instanceof PartitionMetaStateRecord); } }
@Override public Void call() throws Exception { fut.get(); return null; } }, ClusterGroupEmptyException.class, null);
/** * Constructs unique affinity UUID based on affinity key. * * @param affKey Affinity key to use for collocation. */ public AffinityUuid(Object affKey) { super(IgniteUuid.randomUuid(), affKey); }
/** * Constructor. * * @param creatorNodeId Creator node ID. */ protected TcpDiscoveryAbstractMessage(UUID creatorNodeId) { id = IgniteUuid.fromUuid(creatorNodeId); }
/** {@inheritDoc} */ @Override public long getWalTotalSize() { if (!metricsEnabled) return 0; IgniteOutClosure<Long> walSize = this.walSizeProvider; return walSize != null ? walSize.apply() : 0; }
/** * Executes provided job on a node within the underlying cluster group. The result of the * job execution is returned from the result closure. * * @param job Job to execute. * @return Job result. * @throws IgniteException If execution failed. */ @IgniteAsyncSupported public <R> R call(IgniteCallable<R> job) throws IgniteException;
/** */ @IgniteAsyncCallback private static class LocalEventListenerAsync extends LocalEventListener { LocalEventListenerAsync(AtomicInteger transCnt, CountDownLatch transUpdCnt) { super(transCnt, transUpdCnt); } }
/** {@inheritDoc} */ @Override public Object clone() { return super.clone(); } }
/** * */ public List<WALRecord> recordsToWrite() throws Exception { return recordsToWrite.call(); }
/** {@inheritDoc} */ @Override public void onCreated(Iterable<CacheEntryEvent<? extends QueryTestKey, ? extends QueryTestValue>> events) throws CacheEntryListenerException { for (CacheEntryEvent<? extends QueryTestKey, ? extends QueryTestValue> e : events) clsr.apply(ignite, e); } }
/** * Commits this transaction by initiating {@code two-phase-commit} process. * * @throws IgniteException If commit failed. * @throws TransactionTimeoutException If transaction is timed out. * @throws TransactionRollbackException If transaction is automatically rolled back. * @throws TransactionOptimisticException If transaction concurrency is {@link TransactionConcurrency#OPTIMISTIC} * and commit is optimistically failed. * @throws TransactionHeuristicException If transaction has entered an unknown state. */ @IgniteAsyncSupported public void commit() throws IgniteException;
/** * */ @IgniteAsyncCallback private static class CacheEventAsyncListener1 extends CacheEventListener1 { /** * @param saveAll Save all events flag. */ CacheEventAsyncListener1(boolean saveAll) { super(saveAll); } }
/** * Rolls back this transaction. * Note, that it's allowed to roll back transaction from any thread at any time. * * @throws IgniteException If rollback failed. */ @IgniteAsyncSupported public void rollback() throws IgniteException;
/** * {@inheritDoc} * <p> * For {@link CacheAtomicityMode#ATOMIC} return * value on primary node crash may be incorrect because of the automatic retries. It is recommended * to disable retries with {@link #withNoRetries()} and manually restore primary-backup * consistency in case of update failure. * * @throws TransactionException If operation within transaction is failed. */ @IgniteAsyncSupported @Override public boolean replace(K key, V oldVal, V newVal) throws TransactionException;
/** * Clears entry from the cache and swap storage, without notifying listeners or * {@link CacheWriter}s. Entry is cleared only if it is not currently locked, * and is not participating in a transaction. * * @param key Key to clear. * @throws IllegalStateException if the cache is {@link #isClosed()} * @throws CacheException if there is a problem during the clear */ @IgniteAsyncSupported public void clear(K key);
/** * Unregisters all listeners identified with provided operation ID on all nodes in the cluster group. * <p> * Supports asynchronous execution (see {@link IgniteAsyncSupport}). * * @param opId Listen ID that was returned from {@link #remoteListen(Object, IgniteBiPredicate)} method. * @throws IgniteException If failed to unregister listeners. */ @IgniteAsyncSupported public void stopRemoteListen(UUID opId) throws IgniteException;