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.
-
ClassDescriptionThis 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 infoDatabase types specified when setting up CDB sessionsTheCdbDiffIterate
interface should be implemented by any class whose instances are intended to process or iterate through a set of changes.Cdb package generic exceptionThis 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() methodRepresents the start-phase CDB is currently in.General class for protocol constantsThe classCdbSession
represents a session against the Cdb database.Distinguish the different types of subscription notificationsThis class provides subscription functionality to CDB.Distinguish the different types of subscription notificationsSubscription Synchronization type used in sync() methodSubscription type used in subscribe() methodData structure received fromCdb.getTxId()
method.The classCdbUpgradeSession
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.