public void packValueArray(Value[] values) { packArrayBegin(values.length); for (Value value : values) { value.pack(this); } }
public void packValueList(List<Value> list) { packArrayBegin(list.size()); for (Value value : list) { value.pack(this); } }
public void packValueArray(Value[] values) { packArrayBegin(values.length); for (Value value : values) { value.pack(this); } }
public void packValueList(List<Value> list) { packArrayBegin(list.size()); for (Value value : list) { value.pack(this); } }
protected static Operation createOperation(int command, Operation.Type type, String binName, Value v1, Value v2, int v3) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(3); v1.pack(packer); v2.pack(packer); packer.packInt(v3); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, Value v1, Value v2, int v3) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(3); v1.pack(packer); v2.pack(packer); packer.packInt(v3); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createRangeOperation(int command, Operation.Type type, String binName, Value begin, Value end, int returnType) { Packer packer = new Packer(); packer.packRawShort(command); if (begin == null) { begin = Value.getAsNull(); } if (end == null) { packer.packArrayBegin(2); packer.packInt(returnType); begin.pack(packer); } else { packer.packArrayBegin(3); packer.packInt(returnType); begin.pack(packer); end.pack(packer); } return new Operation(type, binName, Value.get(packer.toByteArray())); } }
protected static Operation createRangeOperation(int command, Operation.Type type, String binName, Value begin, Value end, int returnType) { Packer packer = new Packer(); packer.packRawShort(command); if (begin == null) { begin = Value.getAsNull(); } if (end == null) { packer.packArrayBegin(2); packer.packInt(returnType); begin.pack(packer); } else { packer.packArrayBegin(3); packer.packInt(returnType); begin.pack(packer); end.pack(packer); } return new Operation(type, binName, Value.get(packer.toByteArray())); } }
/** * Create default list append operation. * Server appends value to end of list bin. * Server returns list size. */ public static Operation append(String binName, Value value) { Packer packer = new Packer(); packer.packRawShort(APPEND); packer.packArrayBegin(1); value.pack(packer); return new Operation(Operation.Type.CDT_MODIFY, binName, Value.get(packer.toByteArray())); }
/** * Create default list append operation. * Server appends value to end of list bin. * Server returns list size. */ public static Operation append(String binName, Value value) { Packer packer = new Packer(); packer.packRawShort(APPEND); packer.packArrayBegin(1); value.pack(packer); return new Operation(Operation.Type.CDT_MODIFY, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(2); packer.packInt(v1); v2.pack(packer); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(2); packer.packInt(v1); v2.pack(packer); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2, int v3) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(3); packer.packInt(v1); v2.pack(packer); packer.packInt(v3); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2, int v3) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(3); packer.packInt(v1); v2.pack(packer); packer.packInt(v3); return new Operation(type, binName, Value.get(packer.toByteArray())); }
/** * Create list append operation with policy. * Server appends value to list bin. * Server returns list size. */ public static Operation append(ListPolicy policy, String binName, Value value) { Packer packer = new Packer(); packer.packRawShort(APPEND); packer.packArrayBegin(3); value.pack(packer); packer.packInt(policy.attributes); packer.packInt(policy.flags); return new Operation(Operation.Type.CDT_MODIFY, binName, Value.get(packer.toByteArray())); }
/** * Create list append operation with policy. * Server appends value to list bin. * Server returns list size. */ public static Operation append(ListPolicy policy, String binName, Value value) { Packer packer = new Packer(); packer.packRawShort(APPEND); packer.packArrayBegin(3); value.pack(packer); packer.packInt(policy.attributes); packer.packInt(policy.flags); return new Operation(Operation.Type.CDT_MODIFY, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2, int v3, int v4) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(4); packer.packInt(v1); v2.pack(packer); packer.packInt(v3); packer.packInt(v4); return new Operation(type, binName, Value.get(packer.toByteArray())); }
protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, Value v2, int v3, int v4) { Packer packer = new Packer(); packer.packRawShort(command); packer.packArrayBegin(4); packer.packInt(v1); v2.pack(packer); packer.packInt(v3); packer.packInt(v4); return new Operation(type, binName, Value.get(packer.toByteArray())); }