Package com.tailf.cdb


package com.tailf.cdb
Package with methods for connecting to the configuration database. It is important to consider that CDB is locked for writing during a read session using the java api. A session starts with Cdb.startSession() and the lock is not released until the Cdb.endSession() call. CDB will also automatically release the lock if the socket is closed for some other reason, such as program termination.
 // Setup socket to server
 Socket s = new Socket("localhost", 4565);
 Cdb cdb = new Cdb("test", s);
 CdbSession session = cdb.startSession();
 session.cd("/mtest/servers/");
 ConfValue val = session.getElem("server{www}/ip");
 session.endSession();
 s.close();
 
The CDB subscription mechanism allows an external program to be notified when different parts of the configuration changes. At the time of notification it is also possible to iterate through the changes written to CDB. Subscriptions are always towards the running datastore (it is not possible to subscribe to changes to the startup datastore). Subscriptions towards the operational data kept in CDB are also possible, but the mechanism is slightly different.
  • Class
    Description
    This class represents a connection to ConfD/NCS built in XML database.
    Represents the compaction info for CDB files.
    Database file types specified when initiating compaction or retrieving compaction info
    Database types specified when setting up CDB sessions
    The CdbDiffIterate interface should be implemented by any class whose instances are intended to process or iterate through a set of changes.
    Cdb package generic exception
    This exception is used by clients of CdbSubscription that needs to report errors.
     
    DB lock type flag for Cdb Sessions which controls locking of sessions.
    Subscription notification type retrieved from getLatestNotificationType() method
    Represents the start-phase CDB is currently in.
    General class for protocol constants
    The class CdbSession represents a session against the Cdb database.
    Distinguish the different types of subscription notifications
    This class provides subscription functionality to CDB.
    Distinguish the different types of subscription notifications
    Subscription Synchronization type used in sync() method
    Subscription type used in subscribe() method
    Data structure received from Cdb.getTxId() method.
    The class CdbUpgradeSession represents a session against the Cdb database that can be used for accessing data models that are in the process of being deleted by a cdb upgrade.