Package com.cloudhopper.mq.util

Examples of com.cloudhopper.mq.util.Priority


  short transferAttempts = buf.getShort(); //2
  short transfers = buf.getShort(); //2
  byte[] b = new byte[meta.length-14];
  buf.get(b);
  String logItemIdentifier = new String(b);
  return new PriorityMQMessage<T>(transferAttempts, transfers, logItemIdentifier, new Priority(priority), timestamp, new Tiny(sequence).intValue());
    }
View Full Code Here


      this(ByteBuffer.wrap(new byte[8]).putLong(k).array());
  }

  public Key(byte[] k) {
      ByteBuffer buf = ByteBuffer.wrap(k);
      this._priority = new Priority(buf.get());
      long value = 0;
      byte[] b = new byte[6];
      buf.get(b);
      for (int i = 0; i < b.length; i++) {
    value = (value << 8) + (b[i] & 0xff);
View Full Code Here

  }

  public static Key fromCompactString(String s) {
      String[] es = s.split(":");
      if (es.length != 3) throw new IllegalArgumentException("Must be compact string representation of Key.");
      return new Key(new Priority(Integer.parseInt(es[0])),
         Long.parseLong(es[1]),
         new Tiny(Integer.parseInt(es[2])));
  }
View Full Code Here

      this(ByteBuffer.wrap(new byte[8]).putLong(k).array());
  }

  public Key(byte[] k) {
      ByteBuffer buf = ByteBuffer.wrap(k);
      this._priority = new Priority(buf.get());
      long value = 0;
      byte[] b = new byte[6];
      buf.get(b);
      for (int i = 0; i < b.length; i++) {
    value = (value << 8) + (b[i] & 0xff);
View Full Code Here

TOP

Related Classes of com.cloudhopper.mq.util.Priority

Copyright © 2018 www.massapicom. 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.