if (uuid != null) { bb.putShort((short) 16); bb.put(UUIDGen.decompose(uuid)); bb.put((i == -1) && lastIsOne ? (byte) 1 : (byte) 0); if (i != -1) {
bb.putShort((short) 16); bb.put(UUIDGen.decompose(uuid)); bb.put((i == -1) && lastIsOne ? (byte) 1 : (byte) 0); if (i != -1) {
public static ByteBuffer bytes(UUID uuid) { return ByteBuffer.wrap(UUIDGen.decompose(uuid)); }
public static void writeUUID(UUID uuid, ByteBuf cb) { cb.writeBytes(UUIDGen.decompose(uuid)); }
public static void writeUUID(UUID uuid, ByteBuf cb) { cb.writeBytes(UUIDGen.decompose(uuid)); }
public static ByteBuffer bytes(UUID uuid) { return ByteBuffer.wrap(UUIDGen.decompose(uuid)); }
public static ByteBuffer bytes(UUID uuid) { return ByteBuffer.wrap(UUIDGen.decompose(uuid)); }
public static ByteBuffer bytes(UUID uuid) { return ByteBuffer.wrap(UUIDGen.decompose(uuid)); }
public static void writeUUID(UUID uuid, ByteBuf cb) { cb.writeBytes(UUIDGen.decompose(uuid)); }
public ByteBuffer serialize(UUID value) { return value == null ? ByteBufferUtil.EMPTY_BYTE_BUFFER : ByteBuffer.wrap(UUIDGen.decompose(value)); }
public static void writeUUID(UUID uuid, ByteBuf cb) { cb.writeBytes(UUIDGen.decompose(uuid)); }
public static ByteBuffer bytes(UUID uuid) { return ByteBuffer.wrap(UUIDGen.decompose(uuid)); }
public static void writeUUID(UUID uuid, ByteBuf cb) { cb.writeBytes(UUIDGen.decompose(uuid)); }
public ByteBuffer execute(List<ByteBuffer> parameters) { ByteBuffer bb = parameters.get(0); if (bb == null) return null; return ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.minTimeUUID(TimestampType.instance.compose(bb).getTime()))); } };
public ByteBuffer execute(List<ByteBuffer> parameters) { ByteBuffer bb = parameters.get(0); if (bb == null) return null; return ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.maxTimeUUID(TimestampType.instance.compose(bb).getTime()))); } };
public MessageOut(MessagingService.Verb verb, T payload, IVersionedSerializer<T> serializer) { this(verb, payload, serializer, isTracing() ? ImmutableMap.of(TRACE_HEADER, UUIDGen.decompose(Tracing.instance.getSessionId())) : Collections.<String, byte[]>emptyMap()); }
public Map<String, byte[]> getTraceHeaders() { assert isTracing(); return ImmutableMap.of( TRACE_HEADER, UUIDGen.decompose(Tracing.instance.getSessionId()), TRACE_TYPE, new byte[] { Tracing.TraceType.serialize(Tracing.instance.getTraceType()) }); }
public Map<String, byte[]> getTraceHeaders() { assert isTracing(); return ImmutableMap.of( TRACE_HEADER, UUIDGen.decompose(Tracing.instance.getSessionId()), TRACE_TYPE, new byte[] { Tracing.TraceType.serialize(Tracing.instance.getTraceType()) }); }
public Map<String, byte[]> getTraceHeaders() { assert isTracing(); return ImmutableMap.of( TRACE_HEADER, UUIDGen.decompose(Tracing.instance.getSessionId()), TRACE_TYPE, new byte[] { Tracing.TraceType.serialize(Tracing.instance.getTraceType()) }); }
/** set the value to the position of the tuple */ protected void setTupleValue(Tuple pair, int position, Object value) throws ExecException { if (value instanceof BigInteger) pair.set(position, ((BigInteger) value).intValue()); else if (value instanceof ByteBuffer) pair.set(position, new DataByteArray(ByteBufferUtil.getArray((ByteBuffer) value))); else if (value instanceof UUID) pair.set(position, new DataByteArray(UUIDGen.decompose((java.util.UUID) value))); else if (value instanceof Date) pair.set(position, TimestampType.instance.decompose((Date) value).getLong()); else pair.set(position, value); }