Tabnine Logo
T3.<init>
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: apache/ignite

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

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

  /** {@inheritDoc} */
  @Override public Object mergeKey() {
    return new T3<>(getClass(), nearVer, dhtVer);
  }
}
origin: apache/ignite

assert args != null;
T3<Class, String, Integer> cacheKey = new T3<>(clazz, mthdName, args.length);
Method res = SVC_METHODS.get(cacheKey);
origin: apache/ignite

  @Override public void onCustomEvent(AffinityTopologyVersion topVer, ClusterNode snd, TestFastStopProcessCustomMessageAck msg) {
    List<T3<AffinityTopologyVersion, UUID, DiscoveryCustomMessage>> list = rcvdMsgs.get(nodeId);
    if (list == null)
      rcvdMsgs.put(nodeId, list = new ArrayList<>());
    list.add(new T3<>(topVer, snd.id(), (DiscoveryCustomMessage)msg));
  }
}
origin: apache/ignite

  @Override public void onCustomEvent(AffinityTopologyVersion topVer, ClusterNode snd, TestFastStopProcessCustomMessage msg) {
    List<T3<AffinityTopologyVersion, UUID, DiscoveryCustomMessage>> list = rcvdMsgs.get(nodeId);
    if (list == null)
      rcvdMsgs.put(nodeId, list = new ArrayList<>());
    list.add(new T3<>(topVer, snd.id(), (DiscoveryCustomMessage)msg));
  }
}
origin: apache/ignite

  @Override protected T3<Long, Long, Long> doSnapshot() {
    if (rnd.nextBoolean())
      throw new IgniteException(oops);
    return new T3<>(x.get(), y.get(), z.get());
  }
};
origin: apache/ignite

/**
 * Block indexing.
 *
 * @param nodeId Node.
 */
@SuppressWarnings("SuspiciousMethodCalls")
private static CountDownLatch blockIndexing(UUID nodeId) {
  assertFalse(BLOCKS.contains(nodeId));
  CountDownLatch idxLatch = new CountDownLatch(1);
  BLOCKS.put(nodeId, new T3<>(new CountDownLatch(1), new AtomicBoolean(), idxLatch));
  return idxLatch;
}
origin: apache/ignite

/**
 * Block indexing.
 *
 * @param nodeId Node.
 */
@SuppressWarnings("SuspiciousMethodCalls")
private static CountDownLatch blockIndexing(UUID nodeId) {
  assertFalse(BLOCKS.contains(nodeId));
  CountDownLatch idxLatch = new CountDownLatch(1);
  BLOCKS.put(nodeId, new T3<>(new CountDownLatch(1), new AtomicBoolean(), idxLatch));
  return idxLatch;
}
origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
  map = newMap();
  if (kvMap.isEmpty())
    for (int i = 0; i < LOAD_CNT; i++) {
      String k = string();
      String v = string();
      kvMap.put(k,  new T3<>(v, k.getBytes(), v.getBytes()));
    }
}
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

/**
 * Reads and decrypt data from {@code in} stream.
 *
 * @param in Input stream.
 * @param readType If {@code true} plain record type will be read from {@code in}.
 * @return Plain data stream, group id, plain record type,
 * @throws IOException If failed.
 * @throws IgniteCheckedException If failed.
 */
private T3<ByteBufferBackedDataInput, Integer, RecordType> readEncryptedData(ByteBufferBackedDataInput in,
  boolean readType)
  throws IOException, IgniteCheckedException {
  int grpId = in.readInt();
  int encRecSz = in.readInt();
  RecordType plainRecType = null;
  if (readType)
    plainRecType = RecordV1Serializer.readRecordType(in);
  byte[] encData = new byte[encRecSz];
  in.readFully(encData);
  Serializable key = encMgr.groupKey(grpId);
  if (key == null)
    return new T3<>(null, grpId, plainRecType);
  byte[] clData = encSpi.decrypt(encData, key);
  return new T3<>(new ByteBufferBackedDataInputImpl().buffer(ByteBuffer.wrap(clData)), grpId, plainRecType);
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackC)
  throws IgniteSpiException {
  Class msgCls0 = msgCls;
  if (msgCls0 != null && ((GridIoMessage)msg).message().getClass().equals(msgCls0)) {
    queue.add(new T3<>(node, msg, ackC));
    log.info("Block message: " + msg);
    return;
  }
  if (((GridIoMessage)msg).message().getClass().equals(GridDhtPartitionsSingleMessage.class)) {
    if (cls != null)
      cls.apply((GridDhtPartitionsSingleMessage)((GridIoMessage)msg).message());
  }
  super.sendMessage(node, msg, ackC);
}
origin: apache/ignite

/**
 * @param ignite Ignite instance.
 * @return 3 pairs {@code {cacheName, tableName, indexName}} for further sql operations.
 */
@NotNull private List<T3<String, String, String>> createCaches(IgniteEx ignite) {
  List<T3<String, String, String>> caches = new ArrayList<>();
  for (int i = 0; i < 3; i++) {
    String tblName = "TABLE_" + UUID.randomUUID().toString().replace('-', '_');
    String cacheName = "CACHE_" + tblName;
    CacheConfiguration<?, ?> ccfg = new CacheConfiguration<>(cacheName).setSqlSchema("PUBLIC");
    IgniteCache<?, ?> cache = ignite.createCache(ccfg);
    String createTblQryStr = String.format(
      "CREATE TABLE %s (id LONG, name VARCHAR, city_id LONG, PRIMARY KEY (id, city_id)) " +
        "WITH \"backups=1, affinityKey=city_id\"",
      tblName
    );
    cache.query(new SqlFieldsQuery(createTblQryStr)).getAll();
    String idxName = "IDX_" + tblName;
    caches.add(new T3<>(cacheName, tblName, idxName));
  }
  return caches;
}
origin: apache/ignite

/** {@inheritDoc} */
@Override protected void beforeTest() throws Exception {
  map = newMap();
  if (keys == null) {
    keys = new T3[LOAD_CNT];
    wrappers = new GridByteArrayWrapper[LOAD_CNT];
    AffinityFunction aff = new RendezvousAffinityFunction();
    Random rnd = new Random();
    for (int i = 0; i < LOAD_CNT; i++) {
      byte[] key = new byte[rnd.nextInt(511) + 1];
      rnd.nextBytes(key);
      GridByteArrayWrapper wrap = new GridByteArrayWrapper(key);
      keys[i] = new T3<>(aff.partition(wrap), wrap.hashCode(), key);
      wrappers[i] = wrap;
    }
  }
}
origin: apache/ignite

/**
 * @return Result.
 */
@SuppressWarnings("ConstantConditions")
@Override public Object execute() {
  ConcurrentMap<String, T2<AtomicLong, AtomicLong>> nodeLoc = ignite.cluster().nodeLocalMap();
  T2<AtomicLong, AtomicLong> cntrs = nodeLoc.get("cntrs");
  if (cntrs == null) {
    T2<AtomicLong, AtomicLong> other = nodeLoc.putIfAbsent("cntrs",
      cntrs = new T2<>(new AtomicLong(), new AtomicLong(System.currentTimeMillis())));
    if (other != null)
      cntrs = other;
  }
  long cnt = cntrs.get1().incrementAndGet();
  GridNearCacheAdapter near = (GridNearCacheAdapter)((IgniteKernal) ignite).internalCache(cacheName);
  GridDhtCacheAdapter dht = near.dht();
  doWork();
  long start = cntrs.get2().get();
  long now = System.currentTimeMillis();
  long dur = now - start;
  if (dur > 20000 && cntrs.get2().compareAndSet(start, System.currentTimeMillis())) {
    cntrs.get1().set(0);
    long txPerSec = cnt / (dur / 1000);
    X.println("Stats [tx/sec=" + txPerSec + ", nearSize=" + near.size() + ", dhtSize=" + dht.size() + ']');
    return new T3<>(txPerSec, near.size(), dht.size());
  }
  return null;
}
origin: apache/ignite

return new T3<>(key, oldVal, newVal);
origin: apache/ignite

expCaches.put(DEFAULT_CACHE_NAME, new T3<>(RendezvousAffinityFunction.DFLT_PARTITION_COUNT, 0, 1));
expCaches.put("c1", new T3<>(64, 1, 2));
expCaches.put("c2", new T3<>(128, 2, 2));
expCaches.put("c3", new T3<>(256, 1, 2));
expCaches.put("c2", new T3<>(128, 2, 3));
expCaches.put("c3", new T3<>(256, 1, 4));
expCaches.put("c4", new T3<>(256, 0, 1));
expCaches.put("c3", new T3<>(256, 1, 3));
expCaches.put("c3", new T3<>(256, 1, 4));
expCaches.put("c3", new T3<>(256, 1, 3));
origin: apache/ignite

expCaches.put(DEFAULT_CACHE_NAME, new T3<>(RendezvousAffinityFunction.DFLT_PARTITION_COUNT, 0, 1));
expCaches.put("c1", new T3<>(RendezvousAffinityFunction.DFLT_PARTITION_COUNT, 1, 2));
origin: apache/ignite

afterRestEvts.add(new T3<>((Object)j, (Object)i, (Object)oldVal));
org.apache.ignite.internal.util.typedefT3<init>

Javadoc

Empty constructor required by Externalizable.

Popular methods of T3

  • get1
  • get2
  • get3
  • set1
  • set2
  • set3

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JCheckBox (javax.swing)
  • Best plugins for Eclipse
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