/** * @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); }
@Override protected IgniteBiTuple<GridKernalContext, String> initialValue() { return new IgniteBiTuple<>(); } };
@Override protected IgniteBiTuple<GridKernalContext, String> initialValue() { return new IgniteBiTuple<>(); } };
/** * Add field. * * @param name Name. * @param values Values. */ public ModelTrace addField(String name, List values) { mdlFields.add(new IgniteBiTuple<>(name, values)); return this; }
/** {@inheritDoc} */ @Override public void listen(@NotNull Predicate<String> keyPred, DistributedMetaStorageListener<?> lsnr) { DistributedMetaStorageListener<Serializable> lsnrUnchecked = (DistributedMetaStorageListener<Serializable>)lsnr; lsnrs.add(new IgniteBiTuple<>(keyPred, lsnrUnchecked)); }
@Override public IgniteBiTuple<KeyCacheObject, Object> nextX() throws IgniteCheckedException { Map.Entry<KeyCacheObject, Object> next = it.next(); return new IgniteBiTuple<>(next.getKey(), next.getValue()); } }, retval, filter, remainingTime(), true);
/** {@inheritDoc} */ @Override public Iterator<IgniteBiTuple<String, ModelDescriptor>> iterator() { return models.entrySet().stream().map(e -> new IgniteBiTuple<>(e.getKey(), e.getValue())).iterator(); } }
/** * @return Tuple with acknowledge information. */ private IgniteBiTuple<Map<Integer, Long>, Set<AffinityTopologyVersion>> acknowledgeData() { assert size > 0; Map<Integer, Long> cntrs = new HashMap<>(updateCntrs); IgniteBiTuple<Map<Integer, Long>, Set<AffinityTopologyVersion>> res = new IgniteBiTuple<>(cntrs, topVers); topVers = U.newHashSet(1); size = 0; return res; }
/** {@inheritDoc} */ @Override public Iterator<IgniteBiTuple<String, ModelDescriptor>> iterator() { return StreamSupport.stream(Spliterators.spliteratorUnknownSize(models.iterator(), Spliterator.ORDERED), false) .map(e -> new IgniteBiTuple<>(e.getKey(), e.getValue())) .iterator(); } }
@Override public Object execute() { try { Thread.sleep(1000); } catch (InterruptedException ignored) { Thread.currentThread().interrupt(); } return new IgniteBiTuple<>(locNodeId, 1); } });
/** {@inheritDoc} */ @Override protected Object process(List<?> row) throws IgniteCheckedException { T3<Object, Object, Object> row0 = plan.processRowForUpdate(row); return new IgniteBiTuple<>(row0.get1(), row0.get3()); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Nullable @Override public IgniteBiTuple onBeforeRemove(Cache.Entry entry) { return new IgniteBiTuple(false, entry.getValue()); }
/** {@inheritDoc} */ @Nullable @Override public IgniteBiTuple onBeforeRemove(Cache.Entry entry) { return new IgniteBiTuple(entry.getKey().equals(key1), 999); } }
/** * Read all items from metastore. */ public Collection<IgniteBiTuple<String, byte[]>> readAll() throws IgniteCheckedException { ArrayList<IgniteBiTuple<String, byte[]>> res = new ArrayList<>(); GridCursor<MetastorageDataRow> cur = tree.find(null, null); while (cur.next()) { MetastorageDataRow row = cur.get(); res.add(new IgniteBiTuple<>(row.key(), row.value())); } return res; }
/** {@inheritDoc} */ @Nullable @Override public IgniteBiTuple<Boolean, V> onBeforeRemove(Cache.Entry<K, V> entry) { validateEntry(entry); return new IgniteBiTuple<>(false, entry.getValue()); }
/** {@inheritDoc} */ @Override public IgniteBiTuple<Boolean, Object> onBeforeRemove(Cache.Entry<Object, Object> entry) { if (!noInterceptor) return (IgniteBiTuple)delegate.onBeforeRemove((Cache.Entry)entry); return new IgniteBiTuple<>(false, entry.getValue()); }
@Override public IgniteBiTuple<String, BinaryFieldMetadata> read(BinaryRawReaderEx reader) { String name = reader.readString(); int typeId = reader.readInt(); int fieldId = reader.readInt(); return new IgniteBiTuple<String, BinaryFieldMetadata>(name, new BinaryFieldMetadata(typeId, fieldId)); } });
/** {@inheritDoc} */ @Nullable @Override public IgniteBiTuple<Boolean, BinaryObject> onBeforeRemove( Cache.Entry<BinaryObject, BinaryObject> entry) { assertEquals(1, (int)entry.getKey().field("key")); assertEquals(10, (int)entry.getValue().field("val")); onBeforeRmv++; return new IgniteBiTuple<>(false, entry.getValue()); }
/** {@inheritDoc} */ @Nullable @Override public IgniteBiTuple<Boolean, V> onBeforeRemove(Cache.Entry<K, V> entry) { validate(entry.getKey(), entry.getValue(), true, true); return new IgniteBiTuple<>(false, entry.getValue()); }
/** * @param cctx Cctx. * @return Remote partition. */ private IgniteBiTuple<Integer, UUID> remotePartition(final GridCacheContext cctx) { ClusterNode node = F.first(cctx.kernalContext().grid().cluster().forRemotes().nodes()); GridCacheAffinityManager affMgr = cctx.affinity(); AffinityTopologyVersion topVer = affMgr.affinityTopologyVersion(); Set<Integer> parts = affMgr.primaryPartitions(node.id(), topVer); return new IgniteBiTuple<>(F.first(parts), node.id()); }