Examples of CompositeKey


Examples of com.cloudhopper.mq.util.CompositeKey

  boolean jumped = iterator.jump(priorityKeyUtil.encode(getId(), 0L));
  if (!jumped) logger.warn("DataStoreIterator failed to jump to queue's first record {} {}", getId(), 0L);
  // if (!jumped) something is wrong, we should zero the size and exit
  try {
      DataStoreIterator.Record record = iterator.getRecord();
      CompositeKey key = priorityKeyUtil.decode(record.getKey());

      PriorityMQMessage.Key pkey = new PriorityMQMessage.Key(key.getItemId());
      if (key.getQueueId() != getId()) {
    logger.error("{} != {}: {} for queue {}", key.getQueueId(), getId(), pkey, this);
    throw new DataStoreFatalException("The next item wasn't for this queueId");
      }
      if (DEBUG) {
    logger.trace("doTake[{}]: {}", getId(), pkey);
    trxLog.offer(pkey.toCompactString("TAKE:"));
View Full Code Here

Examples of com.netflix.aegisthus.io.writable.CompositeKey

    public boolean nextKeyValue() throws IOException, InterruptedException {
        if (!iterator.hasNext()) {
            return false;
        }
        AtomWritable atomWritable = iterator.next();
        key = new CompositeKey(
                ByteBuffer.wrap(atomWritable.getKey()),
                atomWritable.getAtom().name(),
                atomWritable.getAtom().maxTimestamp()
        );
        value = atomWritable;
View Full Code Here

Examples of com.netflix.aegisthus.io.writable.CompositeKey

    public boolean nextKeyValue() throws IOException, InterruptedException {
        if (!iterator.hasNext()) {
            return false;
        }
        AtomWritable atomWritable = iterator.next();
        key = new CompositeKey(
                ByteBuffer.wrap(atomWritable.getKey()),
                atomWritable.getAtom().name(),
                atomWritable.getAtom().maxTimestamp()
        );
        value = atomWritable;
View Full Code Here

Examples of com.netflix.aegisthus.io.writable.CompositeKey

        }

        @SuppressWarnings("rawtypes")
        @Override
        public int compare(WritableComparable wc1, WritableComparable wc2) {
            CompositeKey ck1 = (CompositeKey) wc1;
            CompositeKey ck2 = (CompositeKey) wc2;
            ck1.setComparator(comparator);
            return ck1.compareTo(ck2);
        }
View Full Code Here

Examples of com.netflix.aegisthus.io.writable.CompositeKey

        }

        @SuppressWarnings("rawtypes")
        @Override
        public int compare(WritableComparable wc1, WritableComparable wc2) {
            CompositeKey ck1 = (CompositeKey) wc1;
            CompositeKey ck2 = (CompositeKey) wc2;
            return ck1.getKey().compareTo(ck2.getKey());
        }
View Full Code Here

Examples of fr.soleil.data.service.CompositeKey

        }
        return result;
    }

    public <TI extends IChartViewer, U> boolean connectWidget(TI widget, IKey keyX, IKey keyY) {
        CompositeKey compKey = new CompositeKey();
        compKey.addKey(CompositeKey.X_INDEX, keyX);
        compKey.addKey(CompositeKey.Y_INDEX, keyY);
        return connectWidget(widget, compKey);
    }
View Full Code Here

Examples of fr.soleil.data.service.CompositeKey

            IKey yKey) {
        return connectWidget(widget, createDualKey(xKey, yKey));
    }

    public static IKey createDualKey(IKey xKey, IKey yKey) {
        CompositeKey compKey = new CompositeKey();
        compKey.addKey(CompositeKey.X_INDEX, xKey);
        compKey.addKey(CompositeKey.Y_INDEX, yKey);
        return compKey;
    }
View Full Code Here

Examples of fr.soleil.data.service.CompositeKey

     * @param xKey The {@link IKey} that identifies the X data source
     * @param yKey The {@link IKey} that identifies the Y data source
     * @return Whether the widget was successfully connected
     */
    public <TI extends IChartViewer, U> boolean connectWidgetDual(TI widget, IKey xKey, IKey yKey) {
        CompositeKey compKey = new CompositeKey();
        compKey.addKey(CompositeKey.X_INDEX, xKey);
        compKey.addKey(CompositeKey.Y_INDEX, yKey);
        return connectWidget(widget, compKey);
    }
View Full Code Here

Examples of fr.soleil.data.service.CompositeKey

     * @param yKey The {@link IKey} that identifies the Y data source
     * @return Whether the widget was successfully connected
     */
    public <TI extends IDataArrayTarget, U> boolean connectWidgetDual(TI widget, IKey xKey,
            IKey yKey) {
        CompositeKey compKey = new CompositeKey();
        compKey.addKey(CompositeKey.X_INDEX, xKey);
        compKey.addKey(CompositeKey.Y_INDEX, yKey);
        return connectWidget(widget, compKey);
    }
View Full Code Here

Examples of fr.soleil.data.service.CompositeKey

            IKey yKey) {
        return connectWidget(widget, createDualKey(xKey, yKey));
    }

    public static IKey createDualKey(IKey xKey, IKey yKey) {
        CompositeKey compKey = new CompositeKey();
        compKey.addKey(CompositeKey.X_INDEX, xKey);
        compKey.addKey(CompositeKey.Y_INDEX, yKey);
        return compKey;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.