Class Exp

java.lang.Object
com.aerospike.client.exp.Exp

public abstract class Exp extends Object
Expression generator.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Expression type.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Exp()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Exp
    abs(Exp value)
    Create operator that returns absolute value of a number.
    static Exp
    add(Exp... exps)
    Create "add" (+) operator that applies to a variable number of expressions.
    static Exp
    and(Exp... exps)
    Create "and" (&&) operator that applies to a variable number of expressions.
    static Exp
    arshift(Exp value, Exp shift)
    Create integer "arithmetic right shift" (>>) operator.
    static Exp
    bin(String name, Exp.Type type)
    Create bin expression of specified type.
    static Exp
    Create expression that returns if bin of specified name exists.
    static Exp
    Create expression that returns bin's integer particle type.
    static Exp
    Create byte[] bin expression.
    static Exp
    Create boolean bin expression.
    static Expression
    build(Exp exp)
    Create final expression that contains packed byte instructions used in the wire protocol.
    static Exp
    ceil(Exp num)
    Create expression that rounds a floating point number up to the closest integer value.
    static Exp
    cond(Exp... exps)
    Conditionally select an expression from a variable number of expression pairs followed by default expression action.
    static Exp
    count(Exp exp)
    Create expression that returns count of integer bits that are set to 1.
    static Exp
    def(String name, Exp value)
    Assign variable to a let(Exp...) expression that can be accessed later.
    static Exp
    Create expression that returns record size on disk.
    static Exp
    digestModulo(int mod)
    Create expression that returns record digest modulo as integer.
    static Exp
    div(Exp... exps)
    Create "divide" (/) operator that applies to a variable number of expressions.
    static Exp
    eq(Exp left, Exp right)
    Create equal (==) expression.
    static Exp
    exclusive(Exp... exps)
    Create expression that returns true if only one of the expressions are true.
    static Exp
    Merge precompiled expression into a new expression tree.
    static Exp
    Create 64 bit float bin expression.
    static Exp
    floor(Exp num)
    Create expression that rounds a floating point number down to the closest integer value.
    static Exp
    ge(Exp left, Exp right)
    Create greater than or equal (>=) operation.
    static Exp
    geo(String val)
    Create geospatial json string value.
    static Exp
    geoBin(String name)
    Create geospatial bin expression.
    static Exp
    geoCompare(Exp left, Exp right)
    Create compare geospatial operation.
    static Exp
    gt(Exp left, Exp right)
    Create greater than (>) operation.
    static Exp
    hllBin(String name)
    Create hll bin expression.
    static Exp
    inf()
    Create infinity value for use in CDT range expressions.
    static Exp
    intAnd(Exp... exps)
    Create integer "and" (&) operator that is applied to two or more integers.
    static Exp
    intBin(String name)
    Create 64 bit integer bin expression.
    static Exp
    intNot(Exp exp)
    Create integer "not" (~) operator.
    static Exp
    intOr(Exp... exps)
    Create integer "or" (|) operator that is applied to two or more integers.
    static Exp
    intXor(Exp... exps)
    Create integer "xor" (^) operator that is applied to two or more integers.
    static Exp
    Create expression that returns if record has been deleted and is still in tombstone state.
    static Exp
    key(Exp.Type type)
    Create record key expression of specified type.
    static Exp
    Create expression that returns if the primary key is stored in the record meta data as a boolean expression.
    static Exp
    Create expression that returns record last update time expressed as 64 bit integer nanoseconds since 1970-01-01 epoch.
    static Exp
    le(Exp left, Exp right)
    Create less than or equals (<=) operation.
    static Exp
    let(Exp... exps)
    Define variables and expressions in scope.
    static Exp
    Create list bin expression.
    static Exp
    log(Exp num, Exp base)
    Create "log" operator for logarithm of "num" with base "base".
    static Exp
    lscan(Exp value, Exp search)
    Create expression that scans integer bits from left (most significant bit) to right (least significant bit), looking for a search bit value.
    static Exp
    lshift(Exp value, Exp shift)
    Create integer "left shift" (<<) operator.
    static Exp
    lt(Exp left, Exp right)
    Create less than (<) operation.
    static Exp
    mapBin(String name)
    Create map bin expression.
    static Exp
    max(Exp... exps)
    Create expression that returns the maximum value in a variable number of expressions.
    static Exp
    Create expression that returns record size in memory.
    static Exp
    min(Exp... exps)
    Create expression that returns the minimum value in a variable number of expressions.
    static Exp
    mod(Exp numerator, Exp denominator)
    Create "modulo" (%) operator that determines the remainder of "numerator" divided by "denominator".
    static Exp
    mul(Exp... exps)
    Create "multiply" (*) operator that applies to a variable number of expressions.
    static Exp
    ne(Exp left, Exp right)
    Create not equal (!=) expression
    static Exp
    nil()
    Create nil value.
    static Exp
    not(Exp exp)
    Create "not" operator expression.
    static Exp
    or(Exp... exps)
    Create "or" (||) operator that applies to a variable number of expressions.
    abstract void
    pack(com.aerospike.client.util.Packer packer)
     
    static Exp
    pow(Exp base, Exp exponent)
    Create "power" operator that raises a "base" to the "exponent" power.
    static Exp
    Create expression that returns the record size.
    static Exp
    regexCompare(String regex, int flags, Exp bin)
    Create expression that performs a regex match on a string bin or string value expression.
    static Exp
    rscan(Exp value, Exp search)
    Create expression that scans integer bits from right (least significant bit) to left (most significant bit), looking for a search bit value.
    static Exp
    rshift(Exp value, Exp shift)
    Create integer "logical right shift" (>>>) operator.
    static Exp
    Create expression that returns record set name string.
    static Exp
    Create expression that returns milliseconds since the record was last updated.
    static Exp
    Create string bin expression.
    static Exp
    sub(Exp... exps)
    Create "subtract" (-) operator that applies to a variable number of expressions.
    static Exp
    toFloat(Exp num)
    Create expression that converts an integer to a float.
    static Exp
    toInt(Exp num)
    Create expression that converts a float to an integer.
    static Exp
    ttl()
    Create expression that returns record expiration time (time to live) in integer seconds.
    static Exp
    Create unknown value.
    static Exp
    val(boolean val)
    Create boolean value.
    static Exp
    val(byte[] val)
    Create blob byte[] value.
    static Exp
    val(double val)
    Create 64 bit floating point value.
    static Exp
    val(long val)
    Create 64 bit integer value.
    static Exp
    val(String val)
    Create string value.
    static Exp
    Create Calendar value expressed in nanoseconds since 1970-01-01 epoch as 64 bit integer.
    static Exp
    val(List<?> list)
    Create list value.
    static Exp
    val(Map<?,?> map)
    Create map value.
    static Exp
    var(String name)
    Retrieve expression value from a variable.
    static Exp
    Create expression that returns record expiration time expressed as 64 bit integer nanoseconds since 1970-01-01 epoch.
    static Exp
    Create wildcard value for use in CDT expressions.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Exp

      public Exp()
  • Method Details

    • build

      public static Expression build(Exp exp)
      Create final expression that contains packed byte instructions used in the wire protocol.
    • key

      public static Exp key(Exp.Type type)
      Create record key expression of specified type.
      
       // Integer record key >= 100000
       Exp.ge(Exp.key(Type.INT), Exp.val(100000))
       
    • keyExists

      public static Exp keyExists()
      Create expression that returns if the primary key is stored in the record meta data as a boolean expression. This would occur when Policy.sendKey is true on record write. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Key exists in record meta data
       Exp.keyExists()
       
    • bin

      public static Exp bin(String name, Exp.Type type)
      Create bin expression of specified type.
      
       // String bin "a" == "views"
       Exp.eq(Exp.bin("a", Type.STRING), Exp.val("views"))
       
    • intBin

      public static Exp intBin(String name)
      Create 64 bit integer bin expression.
      
       // Integer bin "a" == 200
       Exp.eq(Exp.intBin("a"), Exp.val(200))
       
    • floatBin

      public static Exp floatBin(String name)
      Create 64 bit float bin expression.
      
       // Float bin "a" >= 1.5
       Exp.ge(Exp.floatBin("a"), Exp.val(1.5))
       
    • stringBin

      public static Exp stringBin(String name)
      Create string bin expression.
      
       // String bin "a" == "views"
       Exp.eq(Exp.stringBin("a"), Exp.val("views"))
       
    • boolBin

      public static Exp boolBin(String name)
      Create boolean bin expression.
      
       // Boolean bin "a" == true
       Exp.eq(Exp.boolBin("a"), Exp.val(true))
       
    • blobBin

      public static Exp blobBin(String name)
      Create byte[] bin expression.
      
       // Blob bin "a" == [1,2,3]
       Exp.eq(Exp.blobBin("a"), Exp.val(new byte[] {1, 2, 3}))
       
    • geoBin

      public static Exp geoBin(String name)
      Create geospatial bin expression.
      
       // Geo bin "a" == region
       String region = "{ \"type\": \"AeroCircle\", \"coordinates\": [[-122.0, 37.5], 50000.0] }";
       Exp.geoCompare(Exp.geoBin("loc"), Exp.geo(region))
       
    • listBin

      public static Exp listBin(String name)
      Create list bin expression.
      
       // Bin a[2] == 3
       Exp.eq(ListExp.getByIndex(ListReturnType.VALUE, Type.INT, Exp.val(2), Exp.listBin("a")), Exp.val(3))
       
    • mapBin

      public static Exp mapBin(String name)
      Create map bin expression.
      
       // Bin a["key"] == "value"
       Exp.eq(
           MapExp.getByKey(MapReturnType.VALUE, Type.STRING, Exp.val("key"), Exp.mapBin("a")),
           Exp.val("value"));
       
    • hllBin

      public static Exp hllBin(String name)
      Create hll bin expression.
      
       // HLL bin "a" count > 7
       Exp.gt(HLLExp.getCount(Exp.hllBin("a")), Exp.val(7))
       
    • binExists

      public static Exp binExists(String name)
      Create expression that returns if bin of specified name exists.
      
       // Bin "a" exists in record
       Exp.binExists("a")
       
    • binType

      public static Exp binType(String name)
      Create expression that returns bin's integer particle type. See ParticleType.
      
       // Bin "a" particle type is a list
       Exp.eq(Exp.binType("a"), Exp.val(ParticleType.LIST))
       
    • setName

      public static Exp setName()
      Create expression that returns record set name string. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Record set name == "myset"
       Exp.eq(Exp.setName(), Exp.val("myset"))
       
    • recordSize

      public static Exp recordSize()
      Create expression that returns the record size. This expression usually evaluates quickly because record meta data is cached in memory.

      Requires server version 7.0+. This expression replaces deviceSize() and memorySize() since those older expressions are equivalent on server version 7.0+.

      
       // Record size >= 100 KB
       Exp.ge(Exp.recordSize(), Exp.val(100 * 1024))
       
    • deviceSize

      public static Exp deviceSize()
      Create expression that returns record size on disk. If server storage-engine is memory, then zero is returned. This expression usually evaluates quickly because record meta data is cached in memory.

      This expression should only be used for server versions less than 7.0. Use recordSize() for server version 7.0+.

      
       // Record device size >= 100 KB
       Exp.ge(Exp.deviceSize(), Exp.val(100 * 1024))
       
    • memorySize

      public static Exp memorySize()
      Create expression that returns record size in memory. If server storage-engine is not memory nor data-in-memory, then zero is returned. This expression usually evaluates quickly because record meta data is cached in memory.

      Requires server version between 5.3 inclusive and 7.0 exclusive. Use recordSize() for server version 7.0+.

      
       // Record memory size >= 100 KB
       Exp.ge(Exp.memorySize(), Exp.val(100 * 1024))
       
    • lastUpdate

      public static Exp lastUpdate()
      Create expression that returns record last update time expressed as 64 bit integer nanoseconds since 1970-01-01 epoch. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Record last update time >= 2020-01-15
       Exp.ge(Exp.lastUpdate(), Exp.val(new GregorianCalendar(2020, 0, 15)))
       
    • sinceUpdate

      public static Exp sinceUpdate()
      Create expression that returns milliseconds since the record was last updated. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Record last updated more than 2 hours ago
       Exp.gt(Exp.sinceUpdate(), Exp.val(2 * 60 * 60 * 1000))
       
    • voidTime

      public static Exp voidTime()
      Create expression that returns record expiration time expressed as 64 bit integer nanoseconds since 1970-01-01 epoch. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Record expires on 2021-01-01
       Exp.and(
         Exp.ge(Exp.voidTime(), Exp.val(new GregorianCalendar(2021, 0, 1))),
         Exp.lt(Exp.voidTime(), Exp.val(new GregorianCalendar(2021, 0, 2))))
       
    • ttl

      public static Exp ttl()
      Create expression that returns record expiration time (time to live) in integer seconds. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Record expires in less than 1 hour
       Exp.lt(Exp.ttl(), Exp.val(60 * 60))
       
    • isTombstone

      public static Exp isTombstone()
      Create expression that returns if record has been deleted and is still in tombstone state. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Deleted records that are in tombstone state.
       Exp.isTombstone()
       
    • digestModulo

      public static Exp digestModulo(int mod)
      Create expression that returns record digest modulo as integer. This expression usually evaluates quickly because record meta data is cached in memory.
      
       // Records that have digest(key) % 3 == 1
       Exp.eq(Exp.digestModulo(3), Exp.val(1))
       
    • regexCompare

      public static Exp regexCompare(String regex, int flags, Exp bin)
      Create expression that performs a regex match on a string bin or string value expression.
      
       // Select string bin "a" that starts with "prefix" and ends with "suffix".
       // Ignore case and do not match newline.
       Exp.regexCompare("prefix.*suffix", RegexFlag.ICASE | RegexFlag.NEWLINE, Exp.stringBin("a"))
       
      Parameters:
      regex - regular expression string
      flags - regular expression bit flags. See RegexFlag
      bin - string bin or string value expression
    • geoCompare

      public static Exp geoCompare(Exp left, Exp right)
      Create compare geospatial operation.
      
       // Query region within coordinates.
       String region =
       "{ " +
       "  \"type\": \"Polygon\", " +
       "  \"coordinates\": [ " +
       "    [[-122.500000, 37.000000],[-121.000000, 37.000000], " +
       "     [-121.000000, 38.080000],[-122.500000, 38.080000], " +
       "     [-122.500000, 37.000000]] " +
       "    ] " +
       "}";
       Exp.geoCompare(Exp.geoBin("a"), Exp.geo(region))
       
    • geo

      public static Exp geo(String val)
      Create geospatial json string value.
    • val

      public static Exp val(boolean val)
      Create boolean value.
    • val

      public static Exp val(long val)
      Create 64 bit integer value.
    • val

      public static Exp val(Calendar val)
      Create Calendar value expressed in nanoseconds since 1970-01-01 epoch as 64 bit integer.
    • val

      public static Exp val(double val)
      Create 64 bit floating point value.
    • val

      public static Exp val(String val)
      Create string value.
    • val

      public static Exp val(byte[] val)
      Create blob byte[] value.
    • val

      public static Exp val(List<?> list)
      Create list value.
    • val

      public static Exp val(Map<?,?> map)
      Create map value. For ordered maps, pass in a TreeMap or a map that implements the SortedMap interface. For unordered maps, pass in a HashMap.
    • nil

      public static Exp nil()
      Create nil value.
    • inf

      public static Exp inf()
      Create infinity value for use in CDT range expressions.
    • wildcard

      public static Exp wildcard()
      Create wildcard value for use in CDT expressions.
    • not

      public static Exp not(Exp exp)
      Create "not" operator expression.
      
       // ! (a == 0 || a == 10)
       Exp.not(
         Exp.or(
           Exp.eq(Exp.intBin("a"), Exp.val(0)),
           Exp.eq(Exp.intBin("a"), Exp.val(10))))
       
    • and

      public static Exp and(Exp... exps)
      Create "and" (&&) operator that applies to a variable number of expressions.
      
       // (a > 5 || a == 0) && b < 3
       Exp.and(
         Exp.or(
           Exp.gt(Exp.intBin("a"), Exp.val(5)),
           Exp.eq(Exp.intBin("a"), Exp.val(0))),
         Exp.lt(Exp.intBin("b"), Exp.val(3)))
       
    • or

      public static Exp or(Exp... exps)
      Create "or" (||) operator that applies to a variable number of expressions.
      
       // a == 0 || b == 0
       Exp.or(
         Exp.eq(Exp.intBin("a"), Exp.val(0)),
         Exp.eq(Exp.intBin("b"), Exp.val(0)));
       
    • exclusive

      public static Exp exclusive(Exp... exps)
      Create expression that returns true if only one of the expressions are true. Requires server version 5.6.0+.
      
       // exclusive(a == 0, b == 0)
       Exp.exclusive(
         Exp.eq(Exp.intBin("a"), Exp.val(0)),
         Exp.eq(Exp.intBin("b"), Exp.val(0)));
       
    • eq

      public static Exp eq(Exp left, Exp right)
      Create equal (==) expression.
      
       // a == 11
       Exp.eq(Exp.intBin("a"), Exp.val(11))
       
    • ne

      public static Exp ne(Exp left, Exp right)
      Create not equal (!=) expression
      
       // a != 13
       Exp.ne(Exp.intBin("a"), Exp.val(13))
       
    • gt

      public static Exp gt(Exp left, Exp right)
      Create greater than (>) operation.
      
       // a > 8
       Exp.gt(Exp.intBin("a"), Exp.val(8))
       
    • ge

      public static Exp ge(Exp left, Exp right)
      Create greater than or equal (>=) operation.
      
       // a >= 88
       Exp.ge(Exp.intBin("a"), Exp.val(88))
       
    • lt

      public static Exp lt(Exp left, Exp right)
      Create less than (<) operation.
      
       // a < 1000
       Exp.lt(Exp.intBin("a"), Exp.val(1000))
       
    • le

      public static Exp le(Exp left, Exp right)
      Create less than or equals (<=) operation.
      
       // a <= 1
       Exp.le(Exp.intBin("a"), Exp.val(1))
       
    • add

      public static Exp add(Exp... exps)
      Create "add" (+) operator that applies to a variable number of expressions. Return sum of all arguments. All arguments must resolve to the same type (integer or float). Requires server version 5.6.0+.
      
       // a + b + c == 10
       Exp.eq(
         Exp.add(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(10));
       
    • sub

      public static Exp sub(Exp... exps)
      Create "subtract" (-) operator that applies to a variable number of expressions. If only one argument is provided, return the negation of that argument. Otherwise, return the sum of the 2nd to Nth argument subtracted from the 1st argument. All arguments must resolve to the same type (integer or float). Requires server version 5.6.0+.
      
       // a - b - c > 10
       Exp.gt(
         Exp.sub(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(10));
       
    • mul

      public static Exp mul(Exp... exps)
      Create "multiply" (*) operator that applies to a variable number of expressions. Return the product of all arguments. If only one argument is supplied, return that argument. All arguments must resolve to the same type (integer or float). Requires server version 5.6.0+.
      
       // a * b * c < 100
       Exp.lt(
         Exp.mul(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(100));
       
    • div

      public static Exp div(Exp... exps)
      Create "divide" (/) operator that applies to a variable number of expressions. If there is only one argument, returns the reciprocal for that argument. Otherwise, return the first argument divided by the product of the rest. All arguments must resolve to the same type (integer or float). Requires server version 5.6.0+.
      
       // a / b / c > 1
       Exp.gt(
         Exp.div(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(1));
       
    • pow

      public static Exp pow(Exp base, Exp exponent)
      Create "power" operator that raises a "base" to the "exponent" power. All arguments must resolve to floats. Requires server version 5.6.0+.
      
       // pow(a, 2.0) == 4.0
       Exp.eq(
         Exp.pow(Exp.floatBin("a"), Exp.val(2.0)),
         Exp.val(4.0));
       
    • log

      public static Exp log(Exp num, Exp base)
      Create "log" operator for logarithm of "num" with base "base". All arguments must resolve to floats. Requires server version 5.6.0+.
      
       // log(a, 2.0) == 4.0
       Exp.eq(
         Exp.log(Exp.floatBin("a"), Exp.val(2.0)),
         Exp.val(4.0));
       
    • mod

      public static Exp mod(Exp numerator, Exp denominator)
      Create "modulo" (%) operator that determines the remainder of "numerator" divided by "denominator". All arguments must resolve to integers. Requires server version 5.6.0+.
      
       // a % 10 == 0
       Exp.eq(
         Exp.mod(Exp.intBin("a"), Exp.val(10)),
         Exp.val(0));
       
    • abs

      public static Exp abs(Exp value)
      Create operator that returns absolute value of a number. All arguments must resolve to integer or float. Requires server version 5.6.0+.
      
       // abs(a) == 1
       Exp.eq(
         Exp.abs(Exp.intBin("a")),
         Exp.val(1));
       
    • floor

      public static Exp floor(Exp num)
      Create expression that rounds a floating point number down to the closest integer value. The return type is float. Requires server version 5.6.0+.
      
       // floor(2.95) == 2.0
       Exp.eq(
         Exp.floor(Exp.val(2.95)),
         Exp.val(2.0));
       
    • ceil

      public static Exp ceil(Exp num)
      Create expression that rounds a floating point number up to the closest integer value. The return type is float. Requires server version 5.6.0+.
      
       // ceil(2.15) >= 3.0
       Exp.ge(
         Exp.ceil(Exp.val(2.15)),
         Exp.val(3.0));
       
    • toInt

      public static Exp toInt(Exp num)
      Create expression that converts a float to an integer. Requires server version 5.6.0+.
      
       // int(2.5) == 2
       Exp.eq(
         Exp.toInt(Exp.val(2.5)),
         Exp.val(2));
       
    • toFloat

      public static Exp toFloat(Exp num)
      Create expression that converts an integer to a float. Requires server version 5.6.0+.
      
       // float(2) == 2.0
       Exp.eq(
         Exp.toFloat(Exp.val(2))),
         Exp.val(2.0));
       
    • intAnd

      public static Exp intAnd(Exp... exps)
      Create integer "and" (&) operator that is applied to two or more integers. All arguments must resolve to integers. Requires server version 5.6.0+.
      
       // a & 0xff == 0x11
       Exp.eq(
         Exp.intAnd(Exp.intBin("a"), Exp.val(0xff)),
         Exp.val(0x11));
       
    • intOr

      public static Exp intOr(Exp... exps)
      Create integer "or" (|) operator that is applied to two or more integers. All arguments must resolve to integers. Requires server version 5.6.0+.
      
       // a | 0x10 != 0
       Exp.ne(
         Exp.intOr(Exp.intBin("a"), Exp.val(0x10)),
         Exp.val(0));
       
    • intXor

      public static Exp intXor(Exp... exps)
      Create integer "xor" (^) operator that is applied to two or more integers. All arguments must resolve to integers. Requires server version 5.6.0+.
      
       // a ^ b == 16
       Exp.eq(
         Exp.intXor(Exp.intBin("a"), Exp.intBin("b")),
         Exp.val(16));
       
    • intNot

      public static Exp intNot(Exp exp)
      Create integer "not" (~) operator. Requires server version 5.6.0+.
      
       // ~a == 7
       Exp.eq(
         Exp.intNot(Exp.intBin("a")),
         Exp.val(7));
       
    • lshift

      public static Exp lshift(Exp value, Exp shift)
      Create integer "left shift" (<<) operator. Requires server version 5.6.0+.
      
       // a << 8 > 0xff
       Exp.gt(
         Exp.lshift(Exp.intBin("a"), Exp.val(8)),
         Exp.val(0xff));
       
    • rshift

      public static Exp rshift(Exp value, Exp shift)
      Create integer "logical right shift" (>>>) operator. Requires server version 5.6.0+.
      
       // a >>> 8 > 0xff
       Exp.gt(
         Exp.rshift(Exp.intBin("a"), Exp.val(8)),
         Exp.val(0xff));
       
    • arshift

      public static Exp arshift(Exp value, Exp shift)
      Create integer "arithmetic right shift" (>>) operator. Requires server version 5.6.0+.
      
       // a >> 8 > 0xff
       Exp.gt(
         Exp.arshift(Exp.intBin("a"), Exp.val(8)),
         Exp.val(0xff));
       
    • count

      public static Exp count(Exp exp)
      Create expression that returns count of integer bits that are set to 1. Requires server version 5.6.0+.
      
       // count(a) == 4
       Exp.eq(
         Exp.count(Exp.intBin("a")),
         Exp.val(4));
       
    • lscan

      public static Exp lscan(Exp value, Exp search)
      Create expression that scans integer bits from left (most significant bit) to right (least significant bit), looking for a search bit value. When the search value is found, the index of that bit (where the most significant bit is index 0) is returned. If "search" is true, the scan will search for the bit value 1. If "search" is false it will search for bit value 0. Requires server version 5.6.0+.
      
       // lscan(a, true) == 4
       Exp.eq(
         Exp.lscan(Exp.intBin("a"), Exp.val(true)),
         Exp.val(4));
       
    • rscan

      public static Exp rscan(Exp value, Exp search)
      Create expression that scans integer bits from right (least significant bit) to left (most significant bit), looking for a search bit value. When the search value is found, the index of that bit (where the most significant bit is index 0) is returned. If "search" is true, the scan will search for the bit value 1. If "search" is false it will search for bit value 0. Requires server version 5.6.0+.
      
       // rscan(a, true) == 4
       Exp.eq(
         Exp.rscan(Exp.intBin("a"), Exp.val(true)),
         Exp.val(4));
       
    • min

      public static Exp min(Exp... exps)
      Create expression that returns the minimum value in a variable number of expressions. All arguments must be the same type (integer or float). Requires server version 5.6.0+.
      
       // min(a, b, c) > 0
       Exp.gt(
         Exp.min(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(0));
       
    • max

      public static Exp max(Exp... exps)
      Create expression that returns the maximum value in a variable number of expressions. All arguments must be the same type (integer or float). Requires server version 5.6.0+.
      
       // max(a, b, c) > 100
       Exp.gt(
         Exp.max(Exp.intBin("a"), Exp.intBin("b"), Exp.intBin("c")),
         Exp.val(100));
       
    • cond

      public static Exp cond(Exp... exps)
      Conditionally select an expression from a variable number of expression pairs followed by default expression action. Requires server version 5.6.0+.
      
       Args Format: bool exp1, action exp1, bool exp2, action exp2, ..., action-default
      
       // Apply operator based on type.
       Exp.cond(
         Exp.eq(Exp.intBin("type"), Exp.val(0)), Exp.add(Exp.intBin("val1"), Exp.intBin("val2")),
         Exp.eq(Exp.intBin("type"), Exp.val(1)), Exp.sub(Exp.intBin("val1"), Exp.intBin("val2")),
         Exp.eq(Exp.intBin("type"), Exp.val(2)), Exp.mul(Exp.intBin("val1"), Exp.intBin("val2")),
         Exp.val(-1));
       
    • let

      public static Exp let(Exp... exps)
      Define variables and expressions in scope. Requires server version 5.6.0+.
      
       Args Format: <def1>, <def2>, ..., <exp>
       def: {@link Exp#def(String, Exp)}
       exp: Scoped expression
       
      
       // 5 < a < 10
       Exp.let(
         Exp.def("x", Exp.intBin("a")),
         Exp.and(
           Exp.lt(Exp.val(5), Exp.var("x")),
           Exp.lt(Exp.var("x"), Exp.val(10))));
       
    • def

      public static Exp def(String name, Exp value)
      Assign variable to a let(Exp...) expression that can be accessed later. Requires server version 5.6.0+.
      
       // 5 < a < 10
       Exp.let(
         Exp.def("x", Exp.intBin("a")),
         Exp.and(
           Exp.lt(Exp.val(5), Exp.var("x")),
           Exp.lt(Exp.var("x"), Exp.val(10))));
       
    • var

      public static Exp var(String name)
      Retrieve expression value from a variable. Requires server version 5.6.0+.
      
       // 5 < a < 10
       Exp.let(
         Exp.def("x", Exp.intBin("a")),
         Exp.and(
           Exp.lt(Exp.val(5), Exp.var("x")),
           Exp.lt(Exp.var("x"), Exp.val(10))));
       
    • unknown

      public static Exp unknown()
      Create unknown value. Used to intentionally fail an expression. The failure can be ignored with ExpWriteFlags.EVAL_NO_FAIL or ExpReadFlags.EVAL_NO_FAIL. Requires server version 5.6.0+.
      
       // double v = balance - 100.0;
       // return (v > 0.0)? v : unknown;
       Exp.let(
         Exp.def("v", Exp.sub(Exp.floatBin("balance"), Exp.val(100.0))),
         Exp.cond(
           Exp.ge(Exp.var("v"), Exp.val(0.0)), Exp.var("v"),
           Exp.unknown()));
       
    • expr

      public static Exp expr(Expression e)
      Merge precompiled expression into a new expression tree. Useful for storing common precompiled expressions and then reusing these expressions as part of a greater expression.
      
       // Merge precompiled expression into new expression.
       Expression e = Exp.build(Exp.eq(Exp.intBin("a"), Exp.val(200)));
       Expression merged = Exp.build(Exp.and(Exp.expr(e), Exp.eq(Exp.intBin("b"), Exp.val(100))));
       
    • pack

      public abstract void pack(com.aerospike.client.util.Packer packer)