java.lang.Object
org.springframework.data.aerospike.util.Utils

public class Utils extends Object
Utility class containing useful methods for interacting with Aerospike across the entire implementation
Author:
peter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    ctxArrToString(com.aerospike.client.cdt.CTX[] ctxArr)
     
    static com.aerospike.client.exp.Exp.Type
    getExpType(com.aerospike.client.Value value)
     
    static long
    getObjectsCount(com.aerospike.client.cluster.Node node, String namespace, String setName)
     
    static com.aerospike.client.cluster.Node
    getRandomNode(com.aerospike.client.cluster.Node[] nodes)
     
    static int
    getReplicationFactor(com.aerospike.client.cluster.Node[] nodes, String namespace)
     
    static com.aerospike.client.exp.Exp
    getValueExpOrFail(com.aerospike.client.Value value, String errMsg)
    Convert Value type to Exp
    static String[]
    infoAll(com.aerospike.client.IAerospikeClient client, String infoString)
    Issues an "Info" request to all nodes in the cluster.
    static boolean
    Checking that at least one of the arguments is of the following type: a primitive or primitive wrapper, an Enum, a String or other CharSequence, a Number, a Date, a Temporal, a UUID, a URI, a URL, a Locale, or a Class.
    static void
    logQualifierDetails(CriteriaDefinition criteria, org.slf4j.Logger logger)
     
    static String
    valueToString(com.aerospike.client.Value value)
     

    Methods inherited from class java.lang.Object

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

    • Utils

      public Utils()
  • Method Details

    • infoAll

      public static String[] infoAll(com.aerospike.client.IAerospikeClient client, String infoString)
      Issues an "Info" request to all nodes in the cluster.
      Parameters:
      client - An IAerospikeClient.
      infoString - The name of the variable to retrieve.
      Returns:
      An "Info" value for the given variable from all the nodes in the cluster.
    • getReplicationFactor

      public static int getReplicationFactor(com.aerospike.client.cluster.Node[] nodes, String namespace)
    • getRandomNode

      public static com.aerospike.client.cluster.Node getRandomNode(com.aerospike.client.cluster.Node[] nodes)
    • getObjectsCount

      public static long getObjectsCount(com.aerospike.client.cluster.Node node, String namespace, String setName)
    • getValueExpOrFail

      public static com.aerospike.client.exp.Exp getValueExpOrFail(com.aerospike.client.Value value, String errMsg)
      Convert Value type to Exp
      Parameters:
      value - Value instance
      errMsg - Error message to use
      Returns:
      Exp instance
    • getExpType

      public static com.aerospike.client.exp.Exp.Type getExpType(com.aerospike.client.Value value)
    • isSimpleValueType

      public static boolean isSimpleValueType(Class<?> type)
      Checking that at least one of the arguments is of the following type: a primitive or primitive wrapper, an Enum, a String or other CharSequence, a Number, a Date, a Temporal, a UUID, a URI, a URL, a Locale, or a Class.
    • ctxArrToString

      public static String ctxArrToString(com.aerospike.client.cdt.CTX[] ctxArr)
    • logQualifierDetails

      public static void logQualifierDetails(CriteriaDefinition criteria, org.slf4j.Logger logger)
    • valueToString

      public static String valueToString(com.aerospike.client.Value value)