Package com.aerospike.client

Examples of com.aerospike.client.Bin


   */
  public ClResultCode prepend(String namespace, String set, Object key,
      String binName, Object value, ClOptions opts,
      ClWriteOptions wOpts) {
    try {
      super.prepend(getWritePolicy(opts, wOpts), new Key(namespace, set, Value.get(key)), new Bin(binName, value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here


   * @param value        bin value
   * @return          {@link ClResultCode result status}
   */
  public ClResultCode add(Object key, Object value) {
    try {
      super.add(defaultWritePolicy, new Key(mDefaultNamespace, "", Value.get(key)), new Bin(null, value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here

   * @return          {@link ClResultCode result status}
   */
  public ClResultCode add(Object key, Object value, ClOptions opts,
      ClWriteOptions wOpts) {
    try {
      super.add(getWritePolicy(opts, wOpts), new Key(mDefaultNamespace, "", Value.get(key)), new Bin(null, value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here

   */
  public ClResultCode add(String namespace, String set, Object key,
      String binName, Object value, ClOptions opts,
      ClWriteOptions wOpts) {
    try {
      super.add(getWritePolicy(opts, wOpts), new Key(namespace, set, Value.get(key)), new Bin(binName, value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here

      Collection<ClBin> bins, ClOptions opts, ClWriteOptions wOpts) {
    Operation[] operations = new Operation[bins.size() + 1];
    int count = 0;
   
    for (ClBin bin : bins) {
      operations[count++] = Operation.add(new Bin(bin.name, bin.value));
    }
    operations[count] = Operation.get();

    try {
      Record record = super.operate(getWritePolicy(opts, wOpts), new Key(namespace, set, Value.get(key)), operations);
View Full Code Here

      Map<String, Object> bins, ClOptions opts, ClWriteOptions wOpts) {
    Operation[] operations = new Operation[bins.size() + 1];
    int count = 0;
   
    for (Entry<String,Object> entry : bins.entrySet()) {
      operations[count++] = Operation.add(new Bin(entry.getKey(), entry.getValue()));
    }
    operations[count] = Operation.get();

    try {
      Record record = super.operate(getWritePolicy(opts, wOpts), new Key(namespace, set, Value.get(key)), operations);
View Full Code Here

   */
  public ClResultCode addDigest(String namespace, byte[] digest,
      String binName, Object value, ClOptions opts,
      ClWriteOptions wOpts) {
    try {
      super.add(getWritePolicy(opts, wOpts), new Key(namespace, digest), new Bin(binName, value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here

   * @return          {@link ClResultCode result status}
   */
  public ClResultCode addDigest(String namespace, byte[] digest, ClBin bin,
      ClOptions opts, ClWriteOptions wOpts) {
    try {
      super.add(getWritePolicy(opts, wOpts), new Key(namespace, digest), new Bin(bin.name, bin.value));
      return ClResultCode.OK;
    }
    catch (AerospikeException ae) {
      return getResultCode(ae);
    }
View Full Code Here

      ClOptions opts, ClWriteOptions wOpts) {
    Operation[] operations = new Operation[readBinNames.size() + writeBins.size()];
    int count = 0;
   
    for (ClBin bin : writeBins) {
      operations[count++] = Operation.put(new Bin(bin.name, bin.value));
    }

    for (String binName : readBinNames) {
      operations[count++] = Operation.get(binName);
    }
View Full Code Here

    }
    Bin[] binArray = new Bin[bins.size()];
    int count = 0;
   
    for (ClBin bin : bins) {
      binArray[count++] = new Bin(bin.name, bin.value);
    }
    return binArray;
  }
View Full Code Here

TOP

Related Classes of com.aerospike.client.Bin

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.