com.aerospike.client.Value.get()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中com.aerospike.client.Value.get()方法的一些代码示例,展示了Value.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Value.get()方法的具体详情如下:
包路径:com.aerospike.client.Value
类名称:Value
方法名:get

Value.get介绍

[英]Get byte value instance.
[中]获取字节值实例。

代码示例

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Constructor, specifying bin name and byte array value.
 * For servers configured as "single-bin", enter a null or empty name.
 *
 * @param name        bin name, current limit is 14 characters
 * @param value        bin value
 */
public Bin(String name, byte[] value) {
  this.name = name;
  this.value = Value.get(value);
}

代码示例来源:origin: aerospike/aerospike-client-java

/**
 * Create long equality filter for query.
 * 
 * @param name            bin name
 * @param value            filter value
 * @return                filter instance
 */
public static Filter equal(String name, long value) {
  Value val = Value.get(value);
  return new Filter(name, IndexCollectionType.DEFAULT, val.getType(), val, val);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Constructor, specifying bin name and long value.
 * For servers configured as "single-bin", enter a null or empty name.
 *
 * @param name        bin name, current limit is 14 characters
 * @param value        bin value
 */
public Bin(String name, long value) {
  this.name = name;
  this.value = Value.get(value);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create string equality filter for query.
 *
 * @param name            bin name
 * @param value            filter value
 * @return                filter instance
 */
public static Filter equal(String name, String value) {
  Value val = Value.get(value);
  return new Filter(name, IndexCollectionType.DEFAULT, val.getType(), val, val);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Constructor, specifying bin name and double value.
 * <p>
 * For servers configured as "single-bin", enter a null or empty name.
 *
 * @param name        bin name, current limit is 14 characters
 * @param value        bin value
 */
public Bin(String name, double value) {
  this.name = name;
  this.value = Value.get(value);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Get value from Record object. Useful when copying records from one cluster to another.
 */
public static Value getFromRecordObject(Object value) {
  return Value.get(value);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Constructor, specifying bin name and byte value.
 * For servers configured as "single-bin", enter a null or empty name.
 *
 * @param name        bin name, current limit is 14 characters
 * @param value        bin value
 */
public Bin(String name, byte value) {
  this.name = name;
  this.value = Value.get(value);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Constructor, specifying bin name and integer value.
 * The server will convert all integers to longs.
 * For servers configured as "single-bin", enter a null or empty name.
 *
 * @param name        bin name, current limit is 14 characters
 * @param value        bin value
 */
public Bin(String name, int value) {
  this.name = name;
  this.value = Value.get(value);
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create geospatial "within region" filter for query on collection index.
 *
 * @param name            bin name
 * @param type            index collection type
 * @param region        GeoJSON region
 * @return                filter instance
 */
public static Filter geoWithinRegion(String name, IndexCollectionType type, String region) {
  return new Filter(name, type, ParticleType.GEOJSON, Value.get(region), Value.get(region));
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create geospatial "containing point" filter for query.
 *
 * @param name            bin name
 * @param point            GeoJSON point
 * @return                filter instance
 */
public static Filter geoContains(String name, String point) {
  return new Filter(name, IndexCollectionType.DEFAULT, ParticleType.GEOJSON, Value.get(point), Value.get(point));
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create geospatial "containing point" filter for query on collection index.
 *
 * @param name            bin name
 * @param type            index collection type
 * @param point            GeoJSON point.
 * @return                filter instance
 */
public static Filter geoContains(String name, IndexCollectionType type, String point) {
  return new Filter(name, type, ParticleType.GEOJSON, Value.get(point), Value.get(point));
}

代码示例来源:origin: aerospike/aerospike-client-java

/**
 * Create geospatial "within region" filter for query on collection index.
 * 
 * @param name            bin name
 * @param type            index collection type
 * @param region        GeoJSON region
 * @return                filter instance
 */
public static Filter geoWithinRegion(String name, IndexCollectionType type, String region) {
  return new Filter(name, type, ParticleType.GEOJSON, Value.get(region), Value.get(region));
}

代码示例来源:origin: aerospike/aerospike-client-java

/**
 * Create geospatial "containing point" filter for query on collection index.
 * 
 * @param name            bin name
 * @param type            index collection type
 * @param point            GeoJSON point.  
 * @return                filter instance
 */
public static Filter geoContains(String name, IndexCollectionType type, String point) {
  return new Filter(name, type, ParticleType.GEOJSON, Value.get(point), Value.get(point));
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create list increment operation with policy.
 * Server increments list[index] by 1.
 * Server returns list[index] after incrementing.
 */
public static Operation increment(ListPolicy policy, String binName, int index) {
  return CDT.createOperation(INCREMENT, Operation.Type.CDT_MODIFY, binName, index, Value.get(1), policy.attributes, policy.flags);
}

代码示例来源:origin: spring-projects/spring-data-aerospike

/**
 * @param next
 * @return
 */
public Criteria gte(Object o,String propertyName) {
  Qualifier qualifier = new Qualifier(propertyName,
      Qualifier.FilterOperation.GTEQ, Value.get(o));
  this.isValue = o;
  this.criteria.put(Qualifier.FilterOperation.GTEQ.name(), qualifier);
  return this;
}

代码示例来源:origin: com.aerospike/aerospike-client

protected static Operation createOperation(int command, Operation.Type type, String binName) {
  Packer packer = new Packer();
  packer.packRawShort(command);
  return new Operation(type, binName, Value.get(packer.toByteArray()));
}

代码示例来源:origin: com.aerospike/aerospike-client

/**
 * Create default list append items operation.
 * Server appends each input list item to end of list bin.
 * Server returns list size.
 */
public static Operation appendItems(String binName, List<Value> list) {
  Packer packer = new Packer();
  packer.packRawShort(APPEND_ITEMS);
  packer.packArrayBegin(1);
  packer.packValueList(list);
  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, 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

protected static Operation createOperation(int command, Operation.Type type, String binName, int v1, int v2, int v3) {
  Packer packer = new Packer();
  packer.packRawShort(command);
  packer.packArrayBegin(3);
  packer.packInt(v1);
  packer.packInt(v2);
  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, 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()));
}

相关文章

微信公众号

最新文章

更多