/** * @param cctx Cache context. * @param e Entry. */ private void handleBackupEntry(final GridCacheContext cctx, CacheContinuousQueryEntry e) { if (internal || e.updateCounter() == -1L || nodeLeft) // Skip internal query and expire entries. return; CacheContinuousQueryEventBuffer buf = partitionBuffer(cctx, e.partition()); buf.processEntry(e.copyWithDataReset(), true); }
/** {@inheritDoc} */ @Override public void onBatchAcknowledged(final UUID routineId, GridContinuousBatch batch, final GridKernalContext ctx) { sendBackupAcknowledge(ackBuf.onAcknowledged(batch), routineId, ctx); }
/** {@inheritDoc} */ @Override public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException { super.p2pUnmarshal(nodeId, ctx); if (rmtFilterFactoryDep != null) rmtFilterFactory = rmtFilterFactoryDep.unmarshal(nodeId, ctx); }
@Override public void apply(UUID uuid, CacheContinuousQueryBatchAck msg) { CacheContinuousQueryListener lsnr = lsnrs.get(msg.routineId()); if (lsnr != null) lsnr.cleanupBackupQueue(msg.updateCntrs()); } });
/** * @param e Entry to process. * @param backup Backup entry flag. * @return Collected entries to pass to listener (single entry or entries list). */ @Nullable Object processEntry(CacheContinuousQueryEntry e, boolean backup) { return process0(e.updateCounter(), e, backup); }
/** {@inheritDoc} */ @Override public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException { super.p2pUnmarshal(nodeId, ctx); if (rmtTransFactoryDep != null) rmtTransFactory = rmtTransFactoryDep.unmarshal(nodeId, ctx); }
/** * @return Partition ID. */ public int partitionId() { return e.partition(); }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); client = true; startGrid("client"); client = false; }
/** * @return Entry processor. */ private @NotNull EntryProcessor<Integer, Integer, Integer> createEntryProcessor() { return failOnWrite ? new ExternalizableFailedWriteEntryProcessor() : new ExternalizableFailedReadEntryProcessor(); }
/** {@inheritDoc} */ @Override public void onExpired(Iterable<CacheEntryEvent<? extends QueryTestKey, ? extends QueryTestValue>> evts) throws CacheEntryListenerException { onEvents(evts); }
/** {@inheritDoc} */ @Override public CacheEntryEventFilter<K, V> getEventFilter() { if (rmtFilterFactory == null) return null; return super.getEventFilter(); }
/** {@inheritDoc} */ @Override protected NearCacheConfiguration nearCacheConfiguration() { return super.nearCacheConfiguration(); } }
/** {@inheritDoc} */ @Override public NonSerializableFilter create() { return new NonSerializableFilter(); } }
/** * @return Client node index. */ private int getClientIndex() { return getServerNodeCount() - 1; }
/** {@inheritDoc} */ @Override public CacheEntryEventFilter<Object, Object> create() { return new CacheEventFilter(); } }
/** {@inheritDoc} */ @Override public void onUpdated(Iterable<CacheEntryEvent<? extends Integer, ? extends Integer>> evts) throws CacheEntryListenerException { onEvent(evts); }
/** {@inheritDoc} */ @Override public NonSerializableAsyncFilter create() { return new NonSerializableAsyncFilter(); } }
/** * @param expEvts Expected events. * @param lsnr Listener. * @param lostAllow If {@code true} than won't assert on lost events. * @throws Exception If failed. */ private void checkEvents(final List<T3<Object, Object, Object>> expEvts, final CacheEventListener2 lsnr, boolean lostAllow) throws Exception { checkEvents(expEvts, lsnr, lostAllow, true); }
/** {@inheritDoc} */ @Override protected Ignite gridToRunQuery() throws Exception { return grid("client"); } }
/** {@inheritDoc} */ @Override public void onRemoved(Iterable<CacheEntryEvent<? extends QueryTestKey, ? extends QueryTestValue>> evts) throws CacheEntryListenerException { onEvents(evts); }