Tabnine Logo
Value.pack
Code IndexAdd Tabnine to your IDE (free)

How to use
pack
method
in
com.aerospike.client.Value

Best Java code snippets using com.aerospike.client.Value.pack (Showing top 20 results out of 315)

origin: aerospike/aerospike-client-java

public void packValueMap(Map<Value,Value> map) {
  packMapBegin(map.size());
  for (Entry<Value,Value> entry : map.entrySet()) {
    entry.getKey().pack(this);
    entry.getValue().pack(this);
  }
}
origin: com.aerospike/aerospike-client

public void packValueMap(Map<Value,Value> map) {
  packMapBegin(map.size());
  for (Entry<Value,Value> entry : map.entrySet()) {
    entry.getKey().pack(this);
    entry.getValue().pack(this);
  }
}
origin: com.aerospike/aerospike-client

public void packValueArray(Value[] values) {
  packArrayBegin(values.length);
  for (Value value : values) {
    value.pack(this);
  }
}
origin: com.aerospike/aerospike-client

public void packValueList(List<Value> list) {
  packArrayBegin(list.size());
  for (Value value : list) {
    value.pack(this);
  }
}
origin: aerospike/aerospike-client-java

public void packValueArray(Value[] values) {
  packArrayBegin(values.length);
  for (Value value : values) {
    value.pack(this);
  }
}

origin: aerospike/aerospike-client-java

public void packValueList(List<Value> list) {
  packArrayBegin(list.size());
  for (Value value : list) {
    value.pack(this);
  }
}
origin: aerospike/aerospike-client-java

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()));
}
origin: com.aerospike/aerospike-client

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()));
}
origin: aerospike/aerospike-client-java

  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()));
  }
}
origin: com.aerospike/aerospike-client

  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()));
  }
}
origin: aerospike/aerospike-client-java

/**
 * 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()));
}

origin: com.aerospike/aerospike-client

/**
 * 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()));
}
origin: com.aerospike/aerospike-client

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()));
}
origin: aerospike/aerospike-client-java

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()));
}

origin: com.aerospike/aerospike-client

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()));
}
origin: aerospike/aerospike-client-java

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()));
}
origin: com.aerospike/aerospike-client

/**
 * 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()));
}
origin: aerospike/aerospike-client-java

/**
 * 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()));
}
origin: aerospike/aerospike-client-java

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()));
}
origin: com.aerospike/aerospike-client

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()));
}
com.aerospike.clientValuepack

Javadoc

Serialize the value using MessagePack.

Popular methods of Value

  • get
    Get value array instance.
  • getObject
    Return original value as an Object.
  • getAsNull
    Get null value instance.
  • getType
    Get wire protocol value type.
  • toLong
    Return value as a long.
  • getAsGeoJSON
    Get GeoJSON or null value instance.
  • estimateSize
    Calculate number of bytes necessary to serialize the value in the wire protocol.
  • getAsBlob
    Get blob or null value instance.
  • getLuaValue
    Return value as an Object.
  • validateKeyType
    Validate if value type can be used as a key.
  • write
    Serialize the value in the wire protocol.
  • write

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • String (java.lang)
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JPanel (javax.swing)
  • Top PhpStorm plugins
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