Tabnine Logo
Record.getValue
Code IndexAdd Tabnine to your IDE (free)

How to use
getValue
method
in
com.aerospike.client.Record

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

origin: com.aerospike/aerospike-client

/**
 * Get bin value as list.
 */
public List<?> getList(String name) {
  return (List<?>)getValue(name);
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as String.
 */
public String getString(String name) {
  return (String)getValue(name);
}

origin: com.aerospike/aerospike-client

/**
 * Get bin value as map.
 */
public Map<?,?> getMap(String name) {
  return (Map<?,?>)getValue(name);
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as GeoJSON Value.
 */
public GeoJSONValue getGeoJSONValue(String name) {
  return (GeoJSONValue) getValue(name);
}

origin: aerospike/aerospike-client-java

/**
 * Get bin value as map.
 */
public Map<?,?> getMap(String name) {
  return (Map<?,?>)getValue(name);
}
origin: com.aerospike/aerospike-client

/**
 * Get bin value as String.
 */
public String getString(String name) {
  return (String)getValue(name);
}
origin: com.aerospike/aerospike-client

/**
 * Get bin value as long.
 */
public long getLong(String name) {
  // The server always returns numbers as longs if bin found.
  // If bin not found, the result will be null.  Convert null to zero.
  Object result = getValue(name);
  return (result != null)? (Long)result : 0;
}
origin: com.aerospike/aerospike-client

/**
 * Get bin value as GeoJSON Value.
 */
public GeoJSONValue getGeoJSONValue(String name) {
  return (GeoJSONValue) getValue(name);
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as long.
 */
public long getLong(String name) {
  // The server always returns numbers as longs if bin found.
  // If bin not found, the result will be null.  Convert null to zero.
  Object result = getValue(name);
  return (result != null)? (Long)result : 0;
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as list.
 */
public List<?> getList(String name) {
  return (List<?>)getValue(name);
}
origin: com.aerospike/aerospike-client

/**
 * Get bin value as GeoJSON String.
 */
public String getGeoJSONString(String name) {
  return getValue(name).toString();
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as double.
 */
public double getDouble(String name) {
  // The server may return number as double or long.
  // Convert bits if returned as long.
  Object result = getValue(name);
  return (result instanceof Double)? (Double)result : (result != null)? Double.longBitsToDouble((Long)result) : 0.0;
}
origin: aerospike/aerospike-client-java

/**
 * Get bin value as GeoJSON String.
 */
public String getGeoJSONString(String name) {
  return getValue(name).toString();
}

origin: com.aerospike/aerospike-client

/**
 * Get bin value as double.
 */
public double getDouble(String name) {
  // The server may return number as double or long.
  // Convert bits if returned as long.
  Object result = getValue(name);
  return (result instanceof Double)? (Double)result : (result != null)? Double.longBitsToDouble((Long)result) : 0.0;
}
origin: spring-projects/spring-data-aerospike

private ValueWrapper toWrapper(Record record) {
  return (record != null ? new SimpleValueWrapper(record.getValue(VALUE)) : null);
}
origin: aerospike/aerospike-client-java

private void validateBin(Key key, Bin bin, Record record) {
  Object received = record.getValue(bin.name);
  String expected = bin.value.toString();
  
  if (received != null && received.equals(expected)) {
    console.info("Bin matched: namespace=%s set=%s key=%s bin=%s value=%s generation=%d expiration=%d", 
      key.namespace, key.setName, key.userKey, bin.name, received, record.generation, record.expiration);
  }
  else {
    console.error("Put/Get mismatch: Expected %s. Received %s.", expected, received);
  }
}

origin: aerospike/aerospike-client-java

  private void validateBin(Key key, Bin bin, Record record, String id) {
    Object received = (record == null)? null : record.getValue(bin.name);
    String expected = bin.value.toString();
    
    if (received != null && received.equals(expected)) {
      console.info("Bin matched %s: namespace=%s set=%s key=%s bin=%s value=%s", 
        id, key.namespace, key.setName, key.userKey, bin.name, received);
    }
    else {
      console.error("Put/Get mismatch: Expected %s. Received %s.", expected, received);
    }
  }
}
origin: aerospike/aerospike-client-java

  private void validateBin(Key key, Bin bin, Record record) {
    Object received = record.getValue(bin.name);
    String expected = bin.value.toString();
    
    if (received != null && received.equals(expected)) {
      console.info("Data matched: namespace=%s set=%s key=%s bin=%s value=%s generation=%d expiration=%d", 
        key.namespace, key.setName, key.userKey, bin.name, received, record.generation, record.expiration);
    }
    else {
      console.error("Data mismatch: Expected %s. Received %s.", expected, received);
    }
  }
}
origin: aerospike/aerospike-client-java

public void onRecord(Key key, Record record) {
  Level level = Level.ERROR;
  Object value = null;
  
  if (record != null) {
    level = Level.INFO;
    value = record.getValue(binName);
  }
  console.write(level, "Record: ns=%s set=%s digest=%s bin=%s value=%s",
    key.namespace, key.setName, Buffer.bytesToHexString(key.digest), binName, value);
}

origin: org.apache.apex/malhar-contrib

@Override
public long getCommittedWindowId(String appId, int operatorId) {
 try {
  lastWindowFetchCommand.setFilters(Filter.equal(metaTableOperatorIdColumn, operatorId));
  lastWindowFetchCommand.setFilters(Filter.equal(metaTableAppIdColumn, appId));
  long lastWindow = -1;
  RecordSet recordSet = client.query(null, lastWindowFetchCommand);
  while(recordSet.next()) {
   lastWindow = Long.parseLong(recordSet.getRecord().getValue(metaTableWindowColumn).toString());
  }
  return lastWindow;
 }
 catch (AerospikeException ex) {
  throw new RuntimeException(ex);
 }
}
com.aerospike.clientRecordgetValue

Javadoc

Get bin value given bin name. Enter empty string ("") for servers configured as single-bin.

Popular methods of Record

  • <init>
    Initialize record.
  • getInt
    Get bin value as int.
  • toString
    Return String representation of record.
  • getDouble
    Get bin value as double.
  • getGeoJSON
    Get bin value as GeoJSON (backward compatibility).
  • getGeoJSONString
    Get bin value as GeoJSON String.
  • getList
    Get bin value as list.
  • getLong
    Get bin value as long.
  • getString
    Get bin value as String.
  • getTimeToLive
    Convert record expiration (seconds from Jan 01 2010 00:00:00 GMT) to ttl (seconds from now).

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • setScale (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • String (java.lang)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text 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