Class Conf

Object
com.tailf.conf.Conf

public class Conf extends Object
General class for static methods and constants used by the ConfD API:s (Maapi, Cdb, Dp, and Notif)
See Also:
  • Field Details

    • LIBVSN

      public static final int LIBVSN
      Library version.
      See Also:
    • PROTOVSN

      public static final int PROTOVSN
      Library protocol version.
      See Also:
    • PORT

      public static final int PORT
      Default port number that ConfD listens to.
      See Also:
    • NCS_PORT

      public static final int NCS_PORT
      Default port number that NCS listens to. If multiple NCS instances execute on the same host, use NcsMain.getInstance().getNcsPort() to obtain the port number for IPC.
      See Also:
    • IA_CLIENT_MAAPI

      public static final int IA_CLIENT_MAAPI
      Internal Acceptor client ids used by both application and ConfInternal
      See Also:
    • IA_CLIENT_HA

      public static final int IA_CLIENT_HA
      See Also:
    • IA_CLIENT_NCS

      public static final int IA_CLIENT_NCS
      See Also:
    • REPLY_DELAYED_RESPONSE

      public static final int REPLY_DELAYED_RESPONSE
      General return value for many of the API methods.
      See Also:
    • REPLY_ACCUMULATE

      public static final int REPLY_ACCUMULATE
      General return value for many of the API methods.
      See Also:
    • REPLY_OK

      public static final int REPLY_OK
      General return value for many of the API methods.
      See Also:
    • REPLY_ERR

      public static final int REPLY_ERR
      General return value for many of the API methods.
      See Also:
    • REPLY_EOF

      public static final int REPLY_EOF
      General return value for many of the API methods.
      See Also:
    • REPLY_VALIDATION_WARN

      public static final int REPLY_VALIDATION_WARN
      General return value for many of the API methods.
      See Also:
    • REPLY_ALREADY_LOCKED

      public static final int REPLY_ALREADY_LOCKED
      General return value for many of the API methods.
      See Also:
    • DB_NONE

      public static final int DB_NONE
      Indicates the null db (should not be used).
      See Also:
    • DB_CANDIDATE

      public static final int DB_CANDIDATE
      Indicates the candidate configuration.
      See Also:
    • DB_RUNNING

      public static final int DB_RUNNING
      Indicates the running configuration.
      See Also:
    • DB_STARTUP

      public static final int DB_STARTUP
      Indicates the startup configuration.
      See Also:
    • DB_OPERATIONAL

      public static final int DB_OPERATIONAL
      Indicates the operational db.
      See Also:
    • DB_PRE_COMMIT_RUNNING

      public static final int DB_PRE_COMMIT_RUNNING
      Indicates the pre commit running db. Only available in cdb subscriptions
      See Also:
    • DB_INTENDED

      public static final int DB_INTENDED
      Indicates the intended db.
      See Also:
    • DEBUG_SILENT

      public static final int DEBUG_SILENT
      Debug level flag. No debug printouts whatsoever are produced by the library.
      See Also:
    • DEBUG_NORMAL

      public static final int DEBUG_NORMAL
      Debug level flag. The execution of user callback functions will be traced.
      See Also:
    • DEBUG_TRACE

      public static final int DEBUG_TRACE
      Debug level flag. Various internal trace printouts will occur.
      See Also:
    • DEBUG_PROTO

      public static final int DEBUG_PROTO
      Debug level flag. Various internal trace printouts will occur.
      See Also:
    • MODE_READ

      public static final int MODE_READ
      Indicates a read only transaction.
      See Also:
    • MODE_READ_WRITE

      public static final int MODE_READ_WRITE
      Indicates a read and write transaction.
      See Also:
  • Constructor Details

    • Conf

      public Conf()
  • Method Details

    • dbnameToString

      public static String dbnameToString(int dbname)
      Converts a dbname constant into a string
    • modeToString

      public static String modeToString(int mode)
      Converts a mode constant into a string
    • kpToString

      public static String kpToString(ConfObject[] kp)
      Converts a keypath Object[] kp into a string. A keypath is an array of either ConfTag or ConfKey objects. Mostly used for debugging keypaths. Notice that a keypath array is always reversed, beginning with the leaf first. This method will return the string of the keypath in correct order, beginning with namespace and top element first.
      Parameters:
      kp - Keypath
    • hexStringToByteArray

      public static byte[] hexStringToByteArray(String s)
      Converts a hex string to a byte array
    • byteArrayToHexString

      public static String byteArrayToHexString(byte[] a)
      Converts a byte array to a hex string