Tabnine Logo
T3
Code IndexAdd Tabnine to your IDE (free)

How to use
T3
in
org.apache.ignite.internal.util.typedef

Best Java code snippets using org.apache.ignite.internal.util.typedef.T3 (Showing top 20 results out of 315)

origin: apache/ignite

  @Override protected T3<GridKernalContext, String, String> initialValue() {
    return new T3<>();
  }
};
origin: apache/ignite

/**
 * Reconstructs object on unmarshalling.
 *
 * @return Reconstructed object.
 * @throws ObjectStreamException Thrown in case of unmarshalling error.
 */
protected Object readResolve() throws ObjectStreamException {
  try {
    T3<GridKernalContext, String, String> t = stash.get();
    return t.get1().dataStructures().queue(t.get2(), t.get3(), 0, null);
  }
  catch (IgniteCheckedException e) {
    throw U.withCause(new InvalidObjectException(e.getMessage()), e);
  }
  finally {
    stash.remove();
  }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  T3<GridKernalContext, String, String> t = stash.get();
  t.set1((GridKernalContext)in.readObject());
  t.set2(U.readString(in));
  t.set3(U.readString(in));
}
origin: apache/ignite

  /** {@inheritDoc} */
  @Override protected Object process(List<?> row) throws IgniteCheckedException {
    T3<Object, Object, Object> row0 = plan.processRowForUpdate(row);
    return new IgniteBiTuple<>(row0.get1(), row0.get3());
  }
}
origin: apache/ignite

T3<Long, Long, Long> t = e2.getValue();
Long start = t.get1();
Long end = t.get2();
long max = t.get3() == null ? duration : t.get3();
  maxes.put(e2.getKey(), max);
t.set3(null);
origin: apache/ignite

/**
 * @param name Timer name to stop.
 */
@SuppressWarnings("ConstantConditions")
private void stopTimer(String name) {
  ConcurrentMap<String, T3<Long, Long, Long>> m = timers.get(Thread.currentThread());
  T3<Long, Long, Long> t = m.get(name);
  assert t != null;
  long now = System.currentTimeMillis();
  t.set2(now);
  t.set3(Math.max(t.get3() == null ? 0 : t.get3(), now - t.get1()));
}
origin: apache/ignite

/**
 * Handle topology change and clear supply context map of outdated contexts.
 */
void onTopologyChanged() {
  synchronized (scMap) {
    Iterator<T3<UUID, Integer, AffinityTopologyVersion>> it = scMap.keySet().iterator();
    Collection<UUID> aliveNodes = grp.shared().discovery().aliveServerNodes().stream()
      .map(ClusterNode::id)
      .collect(Collectors.toList());
    while (it.hasNext()) {
      T3<UUID, Integer, AffinityTopologyVersion> t = it.next();
      if (!aliveNodes.contains(t.get1())) { // Clear all obsolete contexts.
        clearContext(scMap.get(t), log);
        it.remove();
        if (log.isDebugEnabled())
          log.debug("Supply context removed [grp=" + grp.cacheOrGroupName() + ", demander=" + t.get1() + "]");
      }
    }
  }
}
origin: apache/ignite

/**
 * @param expEvts Expected events.
 * @param lsnr Listener.
 */
private void checkEvents(List<T3<Object, Object, Object>> expEvts, CacheEventListener1 lsnr) {
  for (T3<Object, Object, Object> exp : expEvts) {
    CacheEntryEvent<?, ?> e = lsnr.evts.get(exp.get1());
    assertNotNull("No event for key: " + exp.get1(), e);
    assertEquals("Unexpected value: " + e, exp.get2(), e.getValue());
  }
  expEvts.clear();
  lsnr.evts.clear();
}
origin: apache/ignite

  map.remove(hash(key), t.get2());
else
  map.put(hash(key), t.get2(), t.get3());
origin: apache/ignite

/**
 * @param name Timer name to start.
 */
private void startTimer(String name) {
  ConcurrentMap<String, T3<Long, Long, Long>> m = timers.get(Thread.currentThread());
  if (m == null) {
    ConcurrentMap<String, T3<Long, Long, Long>> old = timers.putIfAbsent(Thread.currentThread(),
      m = new ConcurrentHashMap<>());
    if (old != null)
      m = old;
  }
  T3<Long, Long, Long> t = m.get(name);
  if (t == null) {
    T3<Long, Long, Long> old = m.putIfAbsent(name, t = new T3<>());
    if (old != null)
      t = old;
  }
  t.set1(System.currentTimeMillis());
  t.set2(0L);
}
origin: apache/ignite

/**
 * @param e Event
 * @param expVals expected value
 * @return {@code True} if entries has the same key, value and oldValue. If cache start without backups
 * than oldValue ignoring in comparison.
 */
private boolean equalOldValue(CacheEntryEvent<?, ?> e, T3<Object, Object, Object> expVals) {
  return (e.getOldValue() == null && expVals.get3() == null) // Both null
    || (e.getOldValue() != null && expVals.get3() != null  // Equals
    && e.getOldValue().equals(expVals.get3()))
    || (backups == 0); // If we start without backup than oldValue might be lose.
}
origin: apache/ignite

/**
 * @param row Row.
 * @return Resulting entry.
 * @throws IgniteCheckedException If failed.
 */
public Object processRowForTx(List<?> row) throws IgniteCheckedException {
  switch (mode()) {
    case INSERT:
    case MERGE:
      return processRow(row);
    case UPDATE: {
      T3<Object, Object, Object> row0 = processRowForUpdate(row);
      return new IgniteBiTuple<>(row0.get1(), row0.get3());
    }
    case DELETE:
      return row.get(0);
    default:
      throw new UnsupportedOperationException(String.valueOf(mode()));
  }
}
origin: apache/ignite

/**
 * Unblock indexing.
 *
 * @param nodeId Node ID.
 */
@SuppressWarnings("ConstantConditions")
private static void unblockIndexing(UUID nodeId) {
  T3<CountDownLatch, AtomicBoolean, CountDownLatch> blocker = BLOCKS.remove(nodeId);
  assertNotNull(blocker);
  blocker.get1().countDown();
}
origin: apache/ignite

/**
 * @param expEvts Expected events.
 * @param lsnr Listener.
 * @throws Exception If failed.
 */
private void checkEvents(final List<T3<Object, Object, Object>> expEvts, final CacheEventListener3 lsnr,
  boolean allowLoseEvt) throws Exception {
  if (!allowLoseEvt)
    assert GridTestUtils.waitForCondition(new PA() {
      @Override public boolean apply() {
        return lsnr.evts.size() == expEvts.size();
      }
    }, 2000L);
  for (T3<Object, Object, Object> exp : expEvts) {
    CacheEntryEvent<?, ?> e = lsnr.evts.get(exp.get1());
    assertNotNull("No event for key: " + exp.get1(), e);
    assertEquals("Unexpected value: " + e, exp.get2(), e.getValue());
    if (allowLoseEvt)
      lsnr.evts.remove(exp.get1());
  }
  if (allowLoseEvt)
    assert lsnr.evts.isEmpty();
  expEvts.clear();
  lsnr.evts.clear();
  lsnr.keys.clear();
}
origin: apache/ignite

  map.remove(hash(key), t.get2());
else
  map.insert(hash(key), t.get2(), t.get3());
origin: apache/ignite

/**
 * Reconstructs object on unmarshalling.
 *
 * @return Reconstructed object.
 * @throws ObjectStreamException Thrown in case of unmarshalling error.
 */
protected Object readResolve() throws ObjectStreamException {
  try {
    T3<GridKernalContext, String, String> t = stash.get();
    return t.get1().dataStructures().set(t.get2(), t.get3(), null);
  }
  catch (IgniteCheckedException e) {
    throw U.withCause(new InvalidObjectException(e.getMessage()), e);
  }
  finally {
    stash.remove();
  }
}
origin: apache/ignite

  @Override protected T3<GridKernalContext, String, String> initialValue() {
    return new T3<>();
  }
};
origin: apache/ignite

/**
 *
 */
private void destroyIndex(IgniteEx ignite, T3<String, String, String> pair) {
  IgniteCache<?, ?> cache = ignite.getOrCreateCache(pair.get1());
  String createIdxQryStr = String.format("DROP INDEX %s", pair.get3());
  cache.query(new SqlFieldsQuery(createIdxQryStr)).getAll();
}
origin: apache/ignite

/**
 * Unblock indexing.
 *
 * @param nodeId Node ID.
 */
@SuppressWarnings("ConstantConditions")
private static void unblockIndexing(UUID nodeId) {
  T3<CountDownLatch, AtomicBoolean, CountDownLatch> blocker = BLOCKS.remove(nodeId);
  assertNotNull(blocker);
  blocker.get1().countDown();
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
  T3<GridKernalContext, String, String> t = stash.get();
  t.set1((GridKernalContext)in.readObject());
  t.set2(U.readString(in));
  t.set3(U.readString(in));
}
org.apache.ignite.internal.util.typedefT3

Javadoc

Defines alias for GridTuple3 by extending it. Since Java doesn't provide type aliases (like Scala, for example) we resort to these types of measures. This is intended to provide for more concise code in cases when readability won't be sacrificed. For more information see GridTuple3.

Most used methods

  • <init>
    Fully initializes this tuple.
  • get1
  • get2
  • get3
  • set1
  • set2
  • set3

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • setContentView (Activity)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now