Package com.aerospike.client

Examples of com.aerospike.client.Record


      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);
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here


      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);
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

   * @param key        record identifier, unique within set
   * @return          {@link ClResult} containing single-bin value
   */
  public Object get(Object key) {
    try {
      Record record = super.get(defaultPolicy, new Key(mDefaultNamespace, "", Value.get(key)), "");
      ClResult r = getResult(record);
      // Single-bin result is in results Map, also put it in result Object:
      return r.results != null ? r.results.get("") : null;
    }
    catch (AerospikeException ae) {
View Full Code Here

   */
  public ClResult get(String namespace, String set, Object key,
      String binName, ClOptions opts) {
    try {
      String name = (binName == null)? "" : binName;
      Record record = super.get(getPolicy(opts), new Key(namespace, set, Value.get(key)), name);
      ClResult r = getResult(record);
      // Result for one bin is in results Map, also put it in result Object:
      if (r.results != null) {
        r.result = r.results.get(name);
      }
View Full Code Here

   * @return          {@link ClResult} containing bin name/value pairs
   */
  public ClResult get(String namespace, String set, Object key,
      String[] binNames, ClOptions opts) {
    try {
      Record record = super.get(getPolicy(opts), new Key(namespace, set, Value.get(key)), binNames);
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

   * @return          {@link ClResult} containing bin name/value pairs
   */
  public ClResult get(String namespace, String set, Object key,
      Collection<String> binNames, ClOptions opts) {
    try {
      Record record = super.get(getPolicy(opts), new Key(namespace, set, Value.get(key)), getBinNames(binNames));
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

   * @return          {@link ClResult} containing bin name/value pairs
   */
  public ClResult getAll(String namespace, String set, Object key,
      ClOptions opts) {
    try {
      Record record = super.get(getPolicy(opts), new Key(namespace, set, Value.get(key)));
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

      operations[count++] = Operation.get(binName);
    }
    operations[count] = Operation.touch();

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

   * @return          {@link ClResult} containing bin value
   */
  public ClResult getDigest(String namespace, byte[] digest, String binName,
      ClOptions opts) {
    try {
      Record record = super.get(getPolicy(opts), new Key(namespace, digest), binName);
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

   * @return          {@link ClResult} containing bin name/value pairs
   */
  public ClResult getDigest(String namespace, byte[] digest,
      Collection<String> binNames, ClOptions opts) {
    try {
      Record record = super.get(getPolicy(opts), new Key(namespace, digest), getBinNames(binNames));
      return getResult(record);
    }
    catch (AerospikeException ae) {
      return getResult(ae);
    }
View Full Code Here

TOP

Related Classes of com.aerospike.client.Record

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.