/** * @return Current value and stamp. */ public IgniteBiTuple<T, S> get() { return F.t(val, stamp); }
@Override public IgniteBiTuple<? extends CacheObject, GridCacheVersion> apply(CacheObject val) { return F.t(val, ver); } });
/** * Swaps values. * * @return New tuple with swapped values. */ public IgniteBiTuple<V2, V1> swap() { return F.t(val2, val1); }
/** * Adds configuration to bind on. Should not be called after thread start. * * @param cfg Configuration. * @param mgmt Management flag. */ public void addConfiguration(IgfsIpcEndpointConfiguration cfg, boolean mgmt) { bindCfgs.add(F.t(cfg, mgmt)); }
/** * @param msg Message to add. * @param msgC Message closure (may be {@code null}). */ void add( GridIoMessage msg, @Nullable IgniteRunnable msgC ) { msgs.add(F.t(msg, U.currentTimeMillis(), msgC)); }
/** * @param mode Call mode. * @param job Job. */ private T7(GridClosureCallMode mode, Callable<R> job) { super(U.peerDeployAware(job)); t = F.t(mode, job); }
/** * Process started callback. */ public void onProcessStarted(Process proc) { this.proc = proc; procStarted = true; if (procStarted && replyReceived) onDone(F.t(proc, desc)); }
/** * Gracefully stops worker by adding STOP_INFO to queue. */ private void stop() { delReqs.offer(F.t(new GridFutureAdapter<>(), stopInfo)); }
/** * @param info File info to delete. * @return Future which completes when entry is actually removed. */ private IgniteInternalFuture<Object> deleteAsync(IgfsEntryInfo info) { GridFutureAdapter<Object> fut = new GridFutureAdapter<>(); delReqs.offer(F.t(fut, info)); return fut; }
/** * @param mode Call mode. * @param jobs Collection of jobs. */ private T1(GridClosureCallMode mode, Collection<? extends Runnable> jobs) { super(U.peerDeployAware0(jobs)); t = F.< GridClosureCallMode, Collection<? extends Runnable> >t(mode, jobs); }
/** * @param mode Call mode. * @param job Job. */ private T2(GridClosureCallMode mode, Runnable job) { super(U.peerDeployAware(job)); t = F.t(mode, job); }
/** * * @param mode Call mode. * @param jobs Collection of jobs. * @param rdc Reducer. */ private T3(GridClosureCallMode mode, Collection<? extends Callable<R1>> jobs, IgniteReducer<R1, R2> rdc) { super(U.peerDeployAware0(jobs)); t = F.< GridClosureCallMode, Collection<? extends Callable<R1>>, IgniteReducer<R1, R2> >t(mode, jobs, rdc); }
/** * Reply received callback. */ public void onReplyReceived(HadoopProcessDescriptor desc) { assert childProcId.equals(desc.processId()); this.desc = desc; replyReceived = true; if (procStarted && replyReceived) onDone(F.t(proc, desc)); }
/** * Field for index state check. * * @param name Name. * @param asc Ascending flag. * @return Field. */ protected static IgniteBiTuple<String, Boolean> field(String name, boolean asc) { return F.t(name.toUpperCase(), asc); }
/** {@inheritDoc} */ @Nullable @Override public IgniteBiTuple<Long, Long> reduce(List<ComputeJobResult> results) { long used = 0; long max = 0; for (ComputeJobResult res : results) { IgniteBiTuple<Long, Long> data = res.getData(); if (data != null) { used += data.get1(); max += data.get2(); } } return F.t(used, max); }
/** * @param name Field name. * @param val Value. */ private void value(String name, Object val) { int i = curFields.getIndex(name); OptimizedClassDescriptor.FieldInfo info = curFields.get(i); objs[i] = F.t(info.type(), val); } }
/** {@inheritDoc} */ @Nullable @Override public GridTuple<CacheObject> peek( GridCacheContext cacheCtx, boolean failFast, KeyCacheObject key ) throws GridCacheFilterFailedException { IgniteTxEntry e = entry(cacheCtx.txKey(key)); if (e != null) return e.hasPreviousValue() ? F.t(e.previousValue()) : null; return null; }
/** * Tests correct behavior in case of 1 REST-enabled node * with explicitly specified loopback address setting. * * @throws Exception If error occurs. */ @Test public void testOneNodeLoopbackHost() throws Exception { startRestNode("grid1", LOOPBACK_IP, defaultRestPort()); checkConnectivityByIp(LOOPBACK_IP, F.t((Collection<String>)Collections.singleton(LOOPBACK_IP), (Collection<String>)Collections.<String>emptySet())); }