Package | Description |
---|---|
com.tailf.cdb |
Package with methods for connecting to the configuration database.
|
com.tailf.conf |
Data types and utilities for communication with the server.
|
com.tailf.dp |
Data provider API package, for implementation of callbacks for validations, actions, transformation etc.
|
com.tailf.dp.services |
Service callback specific context and utilities.
|
com.tailf.ha |
Package for setup and control of High Availability cluster nodes.
|
com.tailf.maapi |
MAAPI is an API which provides full access to the systems internal
transaction engine.
|
com.tailf.navu |
NAVU (Navigation Utilities) is an API which provides increased
accessibility to the ConfD/NCS populated data model tree:
NAVU-Tree.
|
com.tailf.notif |
Package for subscription of asynchronous events.
|
com.tailf.util |
Utility classes for representing compiled ConfNamespaces.
|
Modifier and Type | Class and Description |
---|---|
class |
CdbException
Cdb package generic exception
|
class |
CdbExtendedException
This exception is used by clients of CdbSubscription that needs to report
errors.
|
Modifier and Type | Method and Description |
---|---|
static ConfException |
CdbException.mk(ConfResponse r) |
static ConfException |
CdbException.mk(ConfResponse r,
ConfPath path) |
static ConfException |
CdbExtendedException.mk(int extendedErrorCode,
ConfNamespace appNS,
String appTag,
ConfResponse r) |
Modifier and Type | Method and Description |
---|---|
void |
CdbSubscription.abortTransaction(CdbExtendedException ex)
Abort the transaction.
|
void |
CdbSession.cd(ConfPath path)
Changes the working directory.
|
void |
CdbSession.cd(String fmt,
Object... arguments)
Change working directory to container specified by path string
|
void |
CdbSubscription.CLIdiffIterate(int subid,
CdbCLIDiffIterate iter)
(CLI)Iterate over changes made in CDB.
|
void |
CdbSubscription.CLIdiffIterate(int subid,
CdbCLIDiffIterate iter,
EnumSet<DiffIterateFlags> flags,
Object initstate)
(CLI)Iterate over changes made in CDB.
|
void |
CdbSession.create(ConfPath path)
Create a new optional element or list entry.
|
void |
CdbSession.create(String fmt,
Object... arguments)
similar to
CdbSession.create(ConfPath) but specifies element using path
string |
void |
CdbSession.delete(ConfPath path)
Delete an optional element or list entry and all its child elements.
|
void |
CdbSession.delete(String fmt,
Object... arguments)
similar to
CdbSession.delete(ConfPath) but specifies element using path
string |
void |
CdbSubscription.diffIterate(int subid,
CdbDiffIterate iter)
Iterate over changes made in CDB.
|
void |
CdbSubscription.diffIterate(int subid,
CdbDiffIterate iter,
EnumSet<DiffIterateFlags> flags,
Object initstate)
Iterate over changes made in CDB with additional supplied flags.
|
void |
CdbSession.endSession()
Ends the data session
|
boolean |
CdbSession.exists(ConfPath path)
Containers and leafs in a YANG model may be optional.
|
boolean |
CdbSession.exists(String fmt,
Object... arguments)
Checks whether an element exists.
|
ConfObject |
CdbSession.getCase(String choice,
ConfPath path)
Retrieve the currently selected case.
|
ConfObject |
CdbSession.getCase(String choice,
String fmt,
Object... arguments)
Retrieve the currently selected case.
|
String |
CdbSession.getcwd()
Returns the current position as previously set by
CdbSession.cd(ConfPath) ,
CdbSession.pushd(ConfPath) , or CdbSession.popd() as a string. |
ConfObject[] |
CdbSession.getcwdPath()
Returns the current position as previously set by
CdbSession.cd(ConfPath) ,
CdbSession.pushd(ConfPath) , or CdbSession.popd() as a
ConfObject array. |
ConfValue |
CdbSession.getElem(ConfPath path)
This reads a a value from the path.
|
ConfValue |
CdbSession.getElem(String fmt,
Object... arguments)
similar to
CdbSession.getElem(ConfPath) but specifies element using path
string |
List<ConfXMLParam> |
CdbSubscription.getModifications(CdbGetModificationFlag flag)
Deprecated.
|
List<ConfXMLParam> |
CdbSubscription.getModifications(EnumSet<CdbGetModificationFlag> flags)
Retrieve changes that caused by subscription notification.
|
List<ConfXMLParam> |
CdbSubscription.getModifications(int subid,
CdbGetModificationFlag flag,
ConfPath path)
Deprecated.
|
List<ConfXMLParam> |
CdbSubscription.getModifications(int subid,
CdbGetModificationFlag flag,
String fmt,
Object... args)
Deprecated.
|
List<ConfXMLParam> |
CdbSubscription.getModifications(int subid,
EnumSet<CdbGetModificationFlag> flags,
ConfPath path)
Retrieve changes that caused by subscription notification.
|
List<ConfXMLParam> |
CdbSubscription.getModifications(int subid,
EnumSet<CdbGetModificationFlag> flags,
String fmt,
Object... args)
Retrieve changes that caused by subscription notification.
|
String |
CdbSubscription.getModificationsCLI(int subid)
Return a string with the CLI commands that corresponds to the
changes that triggered subscription.
|
String |
CdbSubscription.getModificationsCLI(int subid,
int flags)
CLI string that corresponds to the changes that triggered subscription.
|
int |
CdbSession.getNumberOfInstances(ConfPath path)
Returns the number of elements of a container type.
|
int |
CdbSession.getNumberOfInstances(String fmt,
Object... arguments)
similar to
CdbSession.getNumberOfInstances(ConfPath) but specifies element
using path string |
ConfObject[] |
CdbSession.getObject(int numOfObjects,
ConfPath path)
Same functionality as getObject(numOfObjects, fmt, arguments) but takes a
already constructed ConfPath object as argument instead of fmt,
arguments.
|
ConfObject[] |
CdbSession.getObject(int numOfObjects,
String fmt,
Object... arguments)
In some cases it can be motivated to read multiple values in one request
- this will be more efficient since it only incurs a single round trip to
the server, but usage is a bit more complex.
|
List<ConfObject[]> |
CdbSession.getObjects(int numOfObjects,
int instance,
int numOfInstances,
ConfPath path)
Same functionality as getObjects(numOfObjects, instance, fmt, arguments)
but takes a already constructed ConfPath object as argument instead of
fmt, arguments.
|
List<ConfObject[]> |
CdbSession.getObjects(int numOfObjects,
int instance,
int numOfInstances,
String fmt,
Object... arguments)
Similar to cdb.getObject(), but reads multiple instances of a dynamic
container based on the "instance integer" otherwise given within square
brackets in the path - here the path must specify the dynamic container
without the instance integer.
|
CdbPhase |
Cdb.getPhase()
Returns the start-phase CDB database is currently in.
|
CdbTxId |
Cdb.getTxId()
Returns a CdbTxid object which represents the last transaction
id from CDB.
|
long |
CdbSubscription.getUserSession() |
ConfXMLParam[] |
CdbSession.getValues(ConfXMLParam[] params,
ConfPath path)
Same functionality as getValues(params, fmt, arguments) but takes a
already constructed ConfPath object as argument instead of fmt,
arguments.
|
ConfXMLParam[] |
CdbSession.getValues(ConfXMLParam[] params,
String fmt,
Object... arguments)
Read an arbitrary set of sub-elements of a container element.
|
int |
CdbSession.index(ConfPath path)
Returns the position of a key
|
int |
CdbSession.index(String fmt,
Object... arguments)
similar to
CdbSession.index(ConfPath) but specifies element using path
string |
boolean |
CdbSession.isDefault(ConfPath path)
This method returns true for a leaf which has a default value defined
in the data model when no value has been set, i.e.
|
boolean |
CdbSession.isDefault(String fmt,
Object... arguments)
similar to
CdbSession.isDefault(ConfPath) but specifies element using path
string |
void |
CdbSession.loadFile(String filename)
Load operational data from filename into CDB operational.
|
int |
CdbSession.nextIndex(ConfPath path)
Returns the position of the next key
|
int |
CdbSession.nextIndex(String fmt,
Object... arguments)
similar to
CdbSession.nextIndex(ConfPath) but specifies element using path
string |
int |
CdbSession.numInstances(ConfPath path)
Deprecated.
in favor to getNumberOfInstances, which follows java naming
conventions.
Returns the number of elements of a container type.
|
int |
CdbSession.numInstances(String fmt,
Object... arguments)
Deprecated.
in favor to getNumberOfInstances, which follows java naming
conventions.
similar to
CdbSession.numInstances(ConfPath) but specifies element using
path string |
void |
CdbSession.popd()
Pops the top element from the directory stack and changes directory to
previous directory.
|
void |
CdbSession.pushd(ConfPath path)
Similar to
CdbSession.cd(ConfPath) but pushes the previous current
directory on a stack. |
void |
CdbSession.pushd(String fmt,
Object... arguments)
similar to
CdbSession.pushd(ConfPath) but specifies position using path
string |
int[] |
CdbSubscription.read()
Reads the Cdb subscription socket for events and blocks.
|
void |
CdbSession.setCase(String choice,
String scase,
ConfPath path)
Same functionality as setCase(choice, scase, fmt, arguments) but takes a
already constructed ConfPath object as argument instead of fmt,
arguments.
|
void |
CdbSession.setCase(String choice,
String scase,
String fmt,
Object... arguments)
When we use the YANG choice construct in the data model, this function
can be used to select the current case.
|
void |
CdbSession.setElem(ConfValue value,
ConfPath path)
Sets an element in operational data.
|
void |
CdbSession.setElem(ConfValue value,
String fmt,
Object... arguments)
similar to
CdbSession.setElem(ConfValue, ConfPath) but specifies element
using path string |
void |
CdbSubscription.setMandatory(String mandatoryName)
Attaches a mandatory attribute and a mandatory name to this subscriber
CDB keeps a list of mandatory subscribers for infinite extent, i.e.
|
void |
CdbSession.setNamespace(ConfNamespace ns)
Before we start to read data from CDB we need to set the namespace.
|
void |
CdbSession.setObject(ConfValue[] values,
ConfPath path)
Set all elements corresponding to the complete contents of a container
element, except for list entry sub-elements.
|
void |
CdbSession.setObject(ConfValue[] values,
String fmt,
Object... arguments)
similar to
CdbSession.setObject(ConfValue[], ConfPath) but specifies
element using path string |
void |
Cdb.setTimeout(int timeoutSecs)
A timeout for cdb client actions can be specified via the config file.
|
void |
CdbSession.setValues(ConfXMLParam[] params,
ConfPath path)
Set arbitrary sub-elements of a container element.
|
void |
CdbSession.setValues(ConfXMLParam[] params,
String fmt,
Object... arguments)
similar to
CdbSession.setValues(ConfXMLParam[], ConfPath) but specifies
element using path string |
void |
CdbSession.setValues(List<ConfXMLParam> params,
ConfPath path) |
CdbSession |
Cdb.startSession()
Starts a new CDB Session on an already
established
Cdb against CdbDBType.CDB_RUNNING
datastore with CdbLockType.LOCK_SESSION lock. |
CdbSession |
Cdb.startSession(CdbDBType dbtype)
Starts a new CDB Session on an already
established
Cdb . |
CdbSession |
Cdb.startSession(CdbDBType dbtype,
EnumSet<CdbLockType> lockflags)
Starts a new CDB Session on an already
established
Cdb . |
int |
CdbSubscription.subscribe(CdbSubscriptionType subscriptionType,
EnumSet<CdbSubscrConfigFlag> flags,
int priority,
ConfNamespace ns,
String fmt,
Object... args)
Subscribe to a path.
|
int |
CdbSubscription.subscribe(CdbSubscriptionType subscriptionType,
EnumSet<CdbSubscrConfigFlag> flags,
int priority,
int nshash,
String fmt,
Object... args)
Subscribe to a path.
|
int |
CdbSubscription.subscribe(CdbSubscriptionType subscriptionType,
int priority,
ConfNamespace ns,
String fmt,
Object... args)
Subscribe to a path.
|
int |
CdbSubscription.subscribe(CdbSubscriptionType subscriptionType,
int priority,
int nshash,
String fmt,
Object... args)
Subscribe to a path.
|
int |
CdbSubscription.subscribe(int priority,
ConfNamespace ns,
String fmt,
Object... args)
Subscribe to a given path.
|
int |
CdbSubscription.subscribe(int priority,
int nshash,
String fmt,
Object... args)
Subscribe to given path.
|
void |
CdbSubscription.subscribeDone()
Finishing the subscription setup.
|
void |
CdbSubscription.sync(CdbSubscriptionSyncType subscriptionSyncType)
Synchronize the subscriber.
|
void |
Cdb.triggerSubscriptions(int[] spointArray)
Triggers Cdb subscription for configuration data.
|
void |
Cdb.waitStart()
This call waits until start-phase 1 is completed and CDB
is available.
|
Constructor and Description |
---|
CdbExtendedException(int extendedErrorCode,
ConfNamespace appNS,
String appTag,
ConfException ex) |
Constructor and Description |
---|
Cdb(String name,
Socket socket)
Creates a new instance of a
Cdb socket supplying a
established open socket to ConfD/NCS daemon. |
Cdb(String name,
SocketChannel channel)
Deprecated.
|
Cdb(String name,
SocketChannel channel,
int buffsize)
Deprecated.
|
CdbSession(Cdb cdb)
Creates a new CDB session
instance against the running database.
|
CdbSession(Cdb cdb,
CdbDBType dbtype)
Starts a new session on an already connected Cdb instance.
|
CdbSession(Cdb cdb,
CdbDBType dbtype,
EnumSet<CdbLockType> lockflags)
Starts a new session on an already established Cdb with
explicitly given lockflags.
|
Modifier and Type | Class and Description |
---|---|
class |
ConfBadTermException
Exception thrown when protocol data is malformed.
|
class |
ConfWarningException
Warning exception base class.
|
Modifier and Type | Method and Description |
---|---|
static ConfException |
ConfException.mk(ConfResponse r) |
static ConfException |
ConfException.mk(ConfResponse r,
ConfPath errPath) |
Modifier and Type | Method and Description |
---|---|
ConfPath |
ConfPath.append(String s)
Appends suffix path to existing keypath
|
ConfPath |
ConfPath.copyAppend(String s)
CopyAppends to the keypath
|
static ConfObject |
ConfObject.decode(ConfEObject o) |
static ConfXMLParam |
ConfXMLParam.decodeParam(ConfEObject o)
Decode the internal representation to a
ConfXMLParam
Used internally. |
static ConfXMLParam[] |
ConfXMLParam.decodeParams(ConfEObject o) |
static void |
ConfInternal.diffIterate(Object socket,
ConfIterate iter,
Object initstate) |
static void |
ConfInternal.diffIterate(SelectionKey key,
ConfIterate iter,
Object initstate)
Common static method for diffIterate with CdbSubscription.
|
static long |
ConfInternal.doConnect(SelectionKey key,
int id)
Connects the provided selectable channel to the Erlang process
using the supplied selector with the buffer buf with the identifier
id.
|
static long |
ConfInternal.doConnect(Socket socket,
int id) |
Object |
XPathAbrevCompiler.equal(Object left,
Object right) |
Object |
Compiler.equal(Object left,
Object right)
Produces an EXPRESSION object representing the comparison:
left equals to right
|
static ConfEnumeration |
ConfEnumeration.getEnumByLabel(ConfPath path,
String label)
Get an ConfEnumeration from the string label at a given
position in the schema.
|
static ConfEnumeration |
ConfEnumeration.getEnumByLabel(String path,
String label)
Get an ConfEnumeration from the string label at a given
position in the schema.
|
ConfObject[] |
InstancePath.getKP()
Returns an array of
ConfTag and ConfKey
objects which represents the path in reverted order. |
static String |
ConfEnumeration.getLabelByEnum(ConfPath path,
ConfEnumeration e)
Get the string label of an enumeration at a given
position in the schema.
|
static String |
ConfEnumeration.getLabelByEnum(String path,
ConfEnumeration e)
Get the string label of an enumeration at a given
position in the schema.
|
static Socket |
SocketFactory.getSocket(Object caller)
Retrieve a socket which is connected to the default host/port.
|
static Socket |
SocketFactory.getSocket(Object caller,
InetAddress iaddr,
int port)
Retrieve a connected socket to a specified destination
If the default host/port is not set, it will be set to the same as
the given socket.
|
Socket |
SocketFactoryCallback.getSocket(Object caller,
InetAddress iaddr,
int port)
Retrieve a connected socket to a specified destination
|
static Socket |
SocketFactory.getSocket(Object caller,
String hostname,
int port)
Retrieve a connected socket to a specified destination
If the default host/port is not set, it will be set to the same as
the given socket.
|
Socket |
SocketFactoryCallback.getSocket(Object caller,
String hostname,
int port)
Retrieve a connected socket to a specified destination
|
static String |
ConfValue.getStringByValue(ConfPath path,
ConfValue val)
Get the string representation of a ConfValue at a given
position in the schema.
|
static String |
ConfValue.getStringByValue(String path,
ConfValue val)
Get the string representation of a ConfValue at a given
position in the schema.
|
static Socket |
SocketFactory.getUnconnectedSocket(Object caller)
Retrieve an unconnected socket.
|
Socket |
SocketFactoryCallback.getUnconnectedSocket(Object caller)
Retrieve an unconnected socket.
|
static ConfValue |
ConfValue.getValueByString(ConfPath path,
String str)
Get a ConfValue representation a string at a given
position in the schema.
|
static ConfValue |
ConfValue.getValueByString(String path,
String str)
Get a ConfValue representation a string at a given
position in the schema.
|
static ConfObject[] |
ConfInternal.hk_keypath(ConfEObject term)
Create a hkeypath from a term.
|
static ConfObject[] |
ConfInternal.mk_keypath(ConfEObject term,
ArrayList<ConfNamespace> ns_list)
Makes a keypath from a term.
|
void |
ConfList.move(ConfObject n,
ConfList.WhereTo where,
ConfObject to)
Move a list element to a new position in the list.
|
ConfValue |
ConfTypeDescriptor.newInstance(String str)
Creates a new ConfValue instance of the type described by this
ConfTypeDescriptor and with a value represented by a string.
|
Object |
XPathAbrevCompiler.qname(String prefix,
String tagName) |
Object |
Compiler.qname(String prefix,
String name)
Produces an QNAME that represents a name with an optional prefix.
|
static void |
ConfInternal.readFill(SelectionKey key,
ByteBuffer buf,
int siz)
Read exactly
siz data into the buffer
buf . |
static void |
ConfInternal.readFill(Socket socket,
byte[] b)
Reads data into a buffer.
|
static void |
ConfInternal.readPayLoad(SelectionKey key,
ByteBuffer buf,
int size) |
static void |
ConfInternal.readSize(SelectionKey key,
ByteBuffer buf,
int size) |
static int |
ConfInternal.requestInt(Socket socket,
int op)
Request an integer from ConfD/NCS.
|
static int |
ConfInternal.requestInt(Socket socket,
int op,
int thandle)
Requests an integer value from ConfD/NCS.
|
static ConfResponse |
ConfInternal.requestTerm(SelectionKey key,
int op)
Request the operation
op with no argument,
and read the response from ConfD/NCS. |
static ConfResponse |
ConfInternal.requestTerm(SelectionKey key,
int op,
ConfEObject arg)
Write a term
arg for the specified operation
op and read the response,
from ConfD/NCS. |
static ConfResponse |
ConfInternal.requestTerm(SelectionKey key,
int op,
int thandle,
boolean isrel,
ConfEObject arg)
Write a term
arg for the specified operation
op , transaction handle thandle
( if available -1 otherwise ) and read the response,
from ConfD/NCS. |
static ConfResponse |
ConfInternal.requestTerm(Socket socket,
int op)
Requests a term from ConfD/NCS.
|
static ConfResponse |
ConfInternal.requestTerm(Socket socket,
int op,
ConfEObject arg)
Requests a term from ConfD/NCS.
|
static ConfResponse |
ConfInternal.requestTerm(Socket socket,
int op,
int thandle,
boolean isrel,
ConfEObject arg)
Requests a term from ConfD/NCS.
|
static ConfResponse |
ConfInternal.termRead(Object sock)
Common method to read a term from ConfD/NCS
NOTE: This method should not be used by users of this API.
|
static ConfResponse |
ConfInternal.termRead(SelectionKey key)
Common method to read ( request ) a term from ConfD/NCS
NOTE: This method should not be used by users of this API.
|
static ConfResponse |
ConfInternal.termRead(SelectionKey key,
int cdbop)
Read a response, term from ConfD/NCS with the
given
SelectionKey and the op cdbop . |
static ConfResponse |
ConfInternal.termRead(Socket sock)
Request one term from ConfD/NCS.
|
static ConfResponse |
ConfInternal.termRead(Socket sock,
int cdbop)
Request one term from ConfD/NCS.
|
static Document |
ConfXMLParam.toDOM(ConfXMLParam[] params)
Return String
DOM document representation of a
(Conf)XML-structure. |
static Document |
ConfXMLParam.toDOM(ConfXMLParam[] params,
String parentNode,
String parentURI)
Return String
DOM representation of a
(Conf)XML-structure. |
static String |
ConfXMLParam.toXML(ConfXMLParam[] params)
Return String XML representation of a (Conf)XML-structure.
|
static String |
ConfXMLParam.toXML(ConfXMLParam[] params,
String parentNode,
String parentURI)
Return String XML representation of a (Conf)XML-structure.
|
static ConfXMLParam[] |
ConfXMLParam.toXMLParams(String xml,
ConfPath path)
Converts an xml snippet to a corresponding ConfXMLParam[].
|
static ConfXMLParam[] |
ConfXMLParam.toXMLParams(String xml,
ConfPath path,
int mode)
Converts an xml snippet to a corresponding ConfXMLParam[].
|
static ConfHaNode |
ConfHaNode.unpack_ha_node(ConfEObject term)
Decodes a ConfEObject into a ConfHaNode.
|
Modifier and Type | Class and Description |
---|---|
class |
DpCallbackException
Exception thrown from inside callbacks to identify problems.
|
class |
DpCallbackExtendedException
Extended errorcode Exceptions thrown from inside callbacks to
identify problems.
|
class |
DpCallbackWarningException
Warnings thrown from inside callbacks to identify problems.
|
class |
DpException
General Dp Exception
|
Modifier and Type | Method and Description |
---|---|
static ConfException |
DpException.mk(ConfResponse r) |
static ConfException |
DpCallbackExtendedException.mk(int extendedErrorCode,
ConfNamespace appNS,
String appTag,
ConfResponse r)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DpNotifStream |
Dp.createNotifStream(String name)
Creates (and registers) a notifications stream with ConfD/NCS.
|
DpNotifStream |
Dp.createNotifStream(String name,
DpNotifReplayCallback replayCb)
Creates (and registers) a notifications stream with ConfD/NCS.
|
DpNotifStream |
Dp.createNotifStream(String name,
DpNotifReplayCallback replayCb,
Socket socket)
Creates (and registers) a notifications stream with ConfD/NCS.
|
DpSnmpNotifier |
Dp.createSnmpNotifier(String name,
String context_name)
Creates (and registers) a SNMP Notifer @see
DpSnmpNotifier . |
DpSnmpNotifier |
Dp.createSnmpNotifier(String notify_name,
String context_name,
Object inform_cb)
Creates (and registers) a SNMP Notifier @see
DpSnmpNotifier . |
DpSnmpNotifier |
Dp.createSnmpNotifier(String notify_name,
String context_name,
Object inform_cb,
Socket socket)
Creates (and registers) a SNMP Notifier see
DpSnmpNotifier . |
void |
DpNotifStream.flush()
Notifications are sent asynchronously, i.e.
|
Maapi |
Dp.getServicePointMaapi() |
void |
Dp.read()
Receives data on the control socket which is connected to ConfD/NCS.
|
void |
DpNotifStream.send(ConfDatetime time,
ConfXMLParam params)
Send a notification on this notification stream to ConfD/NCS.
|
void |
DpNotifStream.send(ConfDatetime time,
ConfXMLParam[] params)
Send a notification on this notification stream to ConfD/NCS.
|
void |
DpSnmpNotifier.send(String notification,
SnmpVarbind[] varbinds)
Send SNMP notification.
|
void |
DpSnmpNotifier.send(String notification,
SnmpVarbind[] varbinds,
Integer ref)
Send SNMP notification with the option to receive an Inform Response.
|
Constructor and Description |
---|
DpCallbackExtendedException(int extendedErrorCode,
ConfNamespace appNS,
String appTag,
ConfException ex) |
Constructor and Description |
---|
Dp(String name,
Socket socket)
This constructor will initialize the Dp class library and connect to
ConfD/NCS on the provided control socket.
|
Dp(String name,
Socket ctrlSocket,
boolean isNcs)
This constructor will initialize the Dp class library and connect to
ConfD/NCS on the provided control socket.
|
Dp(String name,
Socket ctrlSocket,
boolean isNcs,
int minThreadPoolSize,
int maxThreadPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> queue,
boolean prestartCoreThreads)
This constructor will initialize the Dp class library and connect to
ConfD/NCS on the provided control socket.
|
DpUserInfo(ConfETuple usess)
Internally used Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
ServiceLog.debug(NavuNode service,
String msg,
ConfIdentityRef type)
Write service log entry with level debug.
|
static void |
ServiceLog.error(NavuNode service,
String msg,
ConfIdentityRef type)
Write service log entry with level error.
|
Maapi |
ServiceContextImpl.getAttachedServiceMaapi()
Internal, subject to change without notice.
Internal used method to get the a maapi object attached to the correct
transaction
|
NavuNode |
ServiceContext.getRootNode()
Returns the path root as a NavuNode with the
NavuContext attached to the ongoing Maapi transaction.
|
NavuNode |
ServiceContextImpl.getRootNode()
Internal, subject to change without notice.
Returns the path root as a NavuNode with the
NavuContext attached to the ongoing Maapi transaction.
|
NavuNode |
NanoServiceContextImpl.getServiceNode()
Internal, subject to change without notice.
|
NavuNode |
ServiceContext.getServiceNode()
Returns the current service path as a NavuNode with the
NavuContext attached to the ongoing Maapi transaction.
|
NavuNode |
ServiceContextImpl.getServiceNode()
Internal, subject to change without notice.
Returns the current service path as a NavuNode with the
NavuContext attached to the ongoing Maapi transaction.
|
static void |
ServiceLog.info(NavuNode service,
String msg,
ConfIdentityRef type)
Write service log entry with level info.
|
static void |
ServiceLog.trace(NavuNode service,
String msg,
ConfIdentityRef type)
Write service log entry with level trace.
|
static void |
ServiceLog.warn(NavuNode service,
String msg,
ConfIdentityRef type)
Write service log entry with level warn.
|
Constructor and Description |
---|
NanoServiceContextImpl(DpTrans dpTrans,
Dp dp,
ConfEObject eObject,
ServiceOperationType operation)
Internal, subject to change without notice.
Internally called constructor to create a ServiceContext
|
ServiceContextImpl(DpTrans dpTrans,
Dp dp,
ConfEObject eObject,
ServiceOperationType operation)
Internal, subject to change without notice.
Internally called constructor to create a ServiceContext
|
ServiceModificationContextImpl(DpTrans dpTrans,
Dp dp,
ConfEObject eObject)
Internally used constructor
|
Modifier and Type | Class and Description |
---|---|
class |
HaException
Exception for the HA handling
|
Modifier and Type | Class and Description |
---|---|
class |
MaapiException
Exception raised from the maapi package
|
class |
MaapiWarningException
Warnings raised from the maapi package
|
Modifier and Type | Method and Description |
---|---|
static ConfException |
MaapiException.mk(ConfResponse r) |
static ConfException |
MaapiException.mk(ConfResponse r,
ConfPath path) |
Modifier and Type | Method and Description |
---|---|
void |
Maapi.aaaReload(boolean synchronous)
When the ConfD/NCS AAA tree is populated by an external data provider,
this method can be used by the data provider to notify ConfD/NCS when
there is a change to the AAA data.
|
void |
Maapi.abortTrans(int tid)
Abort a transaction specified by transaction handle tid.
|
void |
Maapi.abortUpgrade()
Note, This method is only applicable for Confd.
|
void |
Maapi.applyTrans(int tid,
boolean keepOpen)
Apply a current transaction with transaction handle tid.
|
void |
Maapi.applyTrans(int tid,
boolean keepOpen,
int flags)
Apply a current transaction with transaction handle tid
with additional flags (NCS Specific).
|
void |
Maapi.attach(int tid,
int nsi)
Same as
Maapi.attach(int, int, int) with the exception
that the User session id is implicit for the attached transaction. |
void |
Maapi.attach(int tid,
int nsi,
int usid)
Attach to a current transaction.
|
void |
Maapi.attach(int tid,
String ns)
Same as
Maapi.attach(int, String, int) with the exception
that the User session id is implicit for the attached transaction. |
void |
Maapi.attach(int tid,
String ns,
int usid)
Attach to a current transaction.
|
int |
Maapi.attachInit()
Attach to transaction available in phase0.
|
MaapiAuthentication |
Maapi.authenticate(String user,
String passwd)
If we are implementing a proprietary Management Agent with MAAPI API, the
method
Maapi.startUserSession(String,InetAddress,String,String[],
MaapiUserSessionFlag) requires the application to tell ConfD/NCS
which groups the user are member of. |
MaapiAuthentication |
Maapi.authenticate2(String user,
String passwd,
InetAddress src_addr,
int src_port,
String context,
MaapiUserSessionFlag proto)
If we are implementing a proprietary Management Agent with MAAPI API, the
method
Maapi.startUserSession(String,InetAddress,String,String[],
MaapiUserSessionFlag) requires the application to tell ConfD/NCS
which groups the user are member of. |
void |
Maapi.candidateAbortCommit()
This function cancels a pending confirmed commit.
|
void |
Maapi.candidateAbortCommitPersistent(String persistId)
Cancel an ongoing persistent commit with the cookie given by persistId.
|
void |
Maapi.candidateCommit() |
void |
Maapi.candidateCommit(int flags)
This function copies the candidate to running.
|
void |
Maapi.candidateCommitInfo(String label,
String comment)
This method can be used to set the "Label" and/or "Comment"
that is stored in the rollback file when the candidate is committed
to running.
|
void |
Maapi.candidateCommitInfo(String persistId,
String label,
String comment)
This method can be used to set the "Label" and/or "Comment"
that is stored in the rollback file when the candidate is committed
to running.
|
void |
Maapi.candidateCommitPersistent(String persistId)
Confirm an ongoing persistent commit with the cookie given by persistId.
|
void |
Maapi.candidateCommitPersistent(String persistId,
int flags) |
void |
Maapi.candidateConfirmedCommit(int t)
This method also copies the candidate into running.
|
void |
Maapi.candidateConfirmedCommitInfo(int timeoutsecs,
String label,
String comment)
This method does the same as
Maapi.candidateConfirmedCommitPersistent(int, java.lang.String, java.lang.String) , but allows for
setting the "Label" and/or "Comment" that is stored in the
rollback file when the candidate is committed to running. |
void |
Maapi.candidateConfirmedCommitInfo(int timeoutsecs,
String persist,
String persistId,
String label,
String comment)
This method does the same as
Maapi.candidateConfirmedCommitPersistent(int, java.lang.String, java.lang.String) , but allows for
setting the "Label" and/or "Comment" that is stored in the
rollback file when the candidate is committed to running. |
void |
Maapi.candidateConfirmedCommitPersistent(int timeoutsecs,
String persist,
String persistId) |
void |
Maapi.candidateConfirmedCommitPersistent(int timeoutsecs,
String persist,
String persistId,
int flags)
This method can be used to start or extend a persistent confirmed
commit, see the Tail-f Commit Capability section in the NETCONF Server
chapter in the User Guide.
|
void |
Maapi.candidateReset()
This function copies running into candidate.
|
void |
Maapi.candidateValidate()
This function validates the candidate.
|
void |
Maapi.cd(int tid,
String fmt,
Object... arguments)
This function mimics the behavior of the UNIX "cd" command.
|
void |
Maapi.clearOpCache()
Same as
Maapi.clearOpCache(ConfPath) , with the only difference that
if clears all cached data from "/" and down. |
void |
Maapi.clearOpCache(ConfPath path)
Request clearing of the operational data cache (see the Operational Data
the User Guide).
|
String |
Maapi.CLIPrompt(int usid,
String prompt,
boolean echo)
Prompts user for a string.
|
String |
Maapi.CLIPrompt(int usid,
String prompt,
boolean echo,
int timeout)
Prompts user for a string.
|
String |
Maapi.CLIPromptOneOf(int usid,
String prompt,
String[] choice)
Prompt user for one of the strings given in the choice parameter.
|
String |
Maapi.CLIPromptOneOf(int usid,
String prompt,
String[] choice,
int timeout)
Prompt user for one of the strings given in the choice parameter.
|
String |
Maapi.CLIReadEOF(int usid,
boolean echo)
Read a multi line string from the CLI.
|
String |
Maapi.CLIReadEOF(int usid,
boolean echo,
int timeout)
Read a multi line string from the CLI.
|
void |
Maapi.CLIWrite(int usid,
String buf)
Write to the CLI.
|
void |
CLIInteraction.cmd(String command)
Execute CLI command in ongoing CLI session.
|
void |
CLIInteraction.cmd(String command,
EnumSet<CLIInteractionFlag> flags)
Execute CLI command in ongoing CLI session.
|
void |
CLIInteraction.cmd(String command,
EnumSet<CLIInteractionFlag> flags,
String unhide)
Execute CLI command in ongoing CLI session.
|
MaapiInputStream |
CLIInteraction.cmdIO(String command,
EnumSet<CLIInteractionFlag> flags,
String unhide)
Execute CLI command in ongoing CLI session and output result on socket.
|
CommitQueueResult |
Maapi.commitQueueResult(int tid,
int timeout)
This method must be called if applyTrans() or prepareTrans() was
called, and one of the flags COMMIT_NCS_ASYNC_COMMIT_QUEUE or
COMMIT_NCS_SYNC_COMMIT_QUEUE was set, and must not be called
otherwise.
|
void |
Maapi.commitTrans(int tid)
Commit a transaction specified by transaction handle tid.
|
void |
Maapi.commitUpgrade()
Note, This method is only applicable for Confd.
|
int |
Maapi.confirmedCommitInProgress()
Checks whether a confirmed commit is pending.
|
void |
Maapi.copy_tree(int tid,
boolean useSharedCreate,
ConfPath from,
ConfPath to)
This function is used to copy an entire subtree in the configuration from
one point to another.
|
void |
Maapi.copy_tree(int tid,
ConfPath from,
ConfPath to) |
void |
Maapi.copy(int thfrom,
int thto)
If we open two transactions from the same user sessions but towards
different data stores, such as one transaction towards the candidate and
one towards running, we can copy all data from one data store to the
other with this method.
|
void |
Maapi.copyRunningToStartup()
Copies running to startup.
|
void |
Maapi.create(int tid,
ConfPath path)
Create an entity in the XML tree.
|
void |
Maapi.create(int tid,
String fmt,
Object... arguments)
Create a new list entry in the XML tree.
|
void |
Maapi.delete(int tid,
ConfPath path)
Deletes a node and all its children from the XML data tree.
|
void |
Maapi.delete(int tid,
String fmt,
Object... arguments)
Deletes a node and all its children from the XML data tree.
|
void |
Maapi.deleteConfig(int db)
This function empties a data store.
|
ConfObject[][] |
Maapi.deref(int tid,
String fmt,
Object... arguments)
This method dereferences a leafref and returns a list of the objects the
leafref "points" to.
|
void |
Maapi.detach(int tid)
Detaches an attached MAAPI socket.
|
void |
Maapi.diffIterate(int tid,
MaapiDiffIterate iter)
Iterates through the transaction diff.
|
void |
Maapi.diffIterate(int tid,
MaapiDiffIterate iter,
Object initstate,
String fmt,
Object... args)
Iterates through the transaction diff.
|
void |
Maapi.diffIterate(int tid,
MaapiDiffIterate iter,
String fmt,
Object... args)
Iterates through the transaction diff.
|
void |
Maapi.diffIterate(int tid,
Object initstate,
EnumSet<DiffIterateFlags> flags,
MaapiDiffIterate iter,
ConfPath path)
Iterates through the transaction diff.
|
void |
Maapi.disconnectRemote(String address)
Disconnect all remote connections between CONFD_IPC_PORT (see the IPC
section in the Advanced Topics chapter in the User Guide) and address.
|
boolean |
Maapi.doDisplay(int tid,
String fmt,
Object... args)
If the data model uses the YANG 'when' or 'tailf:display-when'
statement, this function can be used to determine if the item
given by the path in fmt should be displayed or not.
|
void |
Maapi.endUserSession()
Ends the current user session on this
Maapi instance. |
boolean |
Maapi.exists(int tid,
ConfPath path)
Boolean function which return 1 or 0 if a path defines an existing
element in the XML data tree.
|
boolean |
Maapi.exists(int tid,
String fmt,
Object... arguments) |
ConfKey |
Maapi.findNext(MaapiCursor c,
ConfFindNextType type,
ConfKey key)
The findNext method makes it possible to jump forward to an element
in the model at a position defined by the MaapiCursor
After the findNext call the same MaapiCursor can be used in subsequent
getNext calls.
|
void |
Maapi.finishTrans(int tid)
Finish the transaction specified by transaction handle tid.
|
String |
CLIInteraction.get(String parameter)
Read CLI session parameter.
|
ConfAttributeValue[] |
Maapi.getAttrs(int tid,
ConfAttributeType[] attribs,
String fmt,
Object... args)
Retrieve attributes for a configuration node.
|
ConfTag |
Maapi.getCase(int tid,
String choice,
ConfPath path) |
ConfTag |
Maapi.getCase(int tid,
String choice,
String fmt,
Object... arguments)
This returns the current 'case' for a 'choice' construct.
|
String |
Maapi.getCwd(int tid)
Returns the current position as previously set by Maapi.cd(),
Maapi.pushd(), or Maapi.popd() as a String.
|
ConfPath |
Maapi.getCwdPath(int tid)
Returns the current position like Maapi.getCwd(), but as a ConfPath
instead of as a String.
|
ConfValue |
Maapi.getElem(int tid,
ConfPath path) |
ConfValue |
Maapi.getElem(int tid,
String fmt,
Object... arguments)
This reads a value from the path in fmt and returns the result.
|
int |
Maapi.getMyUserSession()
Returns the usid associated with this
Maapi |
ConfKey |
Maapi.getNext(MaapiCursor c)
Iterates and gets the keys for the next element pinpointed by the
MaapiCursor initially retrieved by
Maapi.newCursor(int, String, Object...) . |
int |
Maapi.getNumberOfInstances(int tid,
ConfPath path) |
int |
Maapi.getNumberOfInstances(int tid,
String fmt,
Object... arguments)
Return the number of instances in a list.
|
ConfObject[] |
Maapi.getObject(int tid,
String fmt,
Object... arguments)
This reads a container object or a list entry object from the path in fmt
and returns the result.
|
List<ConfObject[]> |
Maapi.getObjects(MaapiCursor c,
int numOfObjects,
int numOfInstances)
Get several list instances with one request.
|
int |
Maapi.getRunningDbStatus()
Query ConfD/NCS for its consistency state.
|
MaapiUserSession |
Maapi.getUserSession(int usid)
Return a
MaapiUserSession given by the usid . |
int[] |
Maapi.getUserSessions()
Return all user sessions id's currently connected to ConfD/NCS.
|
<T extends ConfXMLParam> |
Maapi.getValues(int th,
T[] params,
ConfPath path)
Read an arbitrary set of sub-elements of a container element.
|
<T extends ConfXMLParam> |
Maapi.getValues(int th,
T[] params,
String fmt,
Object... arguments)
Read an arbitrary set of sub-elements of a container element.
|
<T extends List<ConfXMLParam>> |
Maapi.getValues(int th,
T params,
ConfPath path)
Read an arbitrary set of sub-elements of a container element.
|
<T extends List<ConfXMLParam>> |
Maapi.getValues(int th,
T params,
String fmt,
Object... arguments)
Read an arbitrary set of sub-elements of a container element.
|
void |
Maapi.initUpgrade(int timeoutsecs,
int flags)
Note, This method is only applicable for Confd.
|
void |
Maapi.insert(int tid,
boolean createBackPointer,
String fmt,
Object... arguments)
This function inserts a new element in an ordered list of elements.
|
void |
Maapi.insert(int tid,
String fmt,
Object... arguments) |
boolean |
Maapi.isCandidateModified()
Returns true if candidate has been modified, i.e if there are pending non
committed changes to the candidate data store.
|
int |
Maapi.isLockSet(int db)
This methods checks if a lock is taken or not.
|
boolean |
Maapi.isRunningModified()
Returns true if running has been modified since the last copy to startup,
false if it has not been modified.
|
void |
Maapi.iterate(int tid,
Object initstate,
EnumSet<ConfIterateFlags> flags,
MaapiIterate iter,
ConfPath path)
Iterates through all the data in a transaction.
|
void |
Maapi.killUserSession(int usid)
Ends another users session, effectively logging out that user.
|
MaapiRollback[] |
Maapi.listRollback()
Get list of available rollback files.
|
void |
Maapi.loadConfig(int tid,
EnumSet<MaapiConfigFlag> flags,
String filename)
This function loads a configuration from filename into the server.
|
void |
Maapi.loadConfigCmds(int tid,
EnumSet<MaapiConfigFlag> flags,
String cmds,
String fmt,
Object... arguments)
This function loads a configuration from a string into the server.
|
MaapiOutputStream |
Maapi.loadConfigStream(int tid,
EnumSet<MaapiConfigFlag> flags)
Load configuration from a
OuputStream into ConfD/NCS. |
void |
Maapi.loadRollback(int tid,
int nr)
Load rollback file into a given transaction.
|
MaapiSchemas |
Maapi.loadSchemas()
Load Schemas method that downloads all schemas from server into a
MaapiSchemas container, from which specified schemas can be accessed and
traversed.
|
MaapiSchemas |
Maapi.loadSchemas(String[] namespaceURIs)
Load Schemas method that downloads a specified number of schemas
the server into a MaapiSchemas container, from which specified schemas
can be accessed and transversed.
|
void |
Maapi.lock(int db)
This function is used to take a lock on one of the databases.
|
int |
Maapi.lockPartial(int db,
String xpath)
Same as
Maapi.lockPartial(int,String[]) except only one xpath
expression is given. |
int |
Maapi.lockPartial(int db,
String[] xpaths)
It is possible to manipulate partial locks on the databases, i.e.
|
void |
Maapi.move(int tid,
ConfKey tokey,
String fmt,
Object... arguments)
This function moves an existing object.
|
void |
Maapi.move(int tid,
String tokey,
String fmt,
Object... arguments)
This function moves an existing object
|
void |
Maapi.moveOrdered(int tid,
MoveWhereFlag where,
ConfKey tokey,
String fmt,
Object... arguments)
For a list with the YANG ordered-by user statement, this function can be
used to change the order of entries, by moving one entry to a new
position.
|
void |
Maapi.ncsApplyReverseDiffSet(int tid,
ConfPath serviceIKP)
Internal, subject to change without notice.
|
void |
Maapi.ncsApplyTemplate(int tid,
String template,
ConfPath rootIKP,
Properties variables,
boolean createShared,
boolean createBackpointer) |
void |
Maapi.ncsApplyTemplate(int tid,
String template,
ConfPath rootIKP,
Properties variables,
String document,
boolean createShared,
boolean createBackpointer) |
void |
Maapi.ncsCommitSaveTrans(int tidfrom,
int tidto,
int usid,
String fmt,
Object... args)
Internal, subject to change without notice.
NCS specific internal method
|
ConfEObject |
Maapi.ncsFunCall(String functionName,
ConfEObject args)
Internal, subject to change without notice.
NCS specific internal maapi function
|
String[] |
Maapi.ncsGetTemplateVariables(String template) |
void |
Maapi.ncsMovePrivateData(int initTid,
ConfPath from,
ConfPath to)
Used in service data migrations, after config data has been moved in
the data upgrade, also the service ncs specific private data has to be
moved.
|
Set<String> |
Maapi.ncsTemplates() |
void |
Maapi.ncsWriteServiceLogEntry(ConfPath serviceIKP,
String msg,
ConfIdentityRef type,
ConfEnumeration level)
Internal, subject to change without notice.
NCS specific internal maapi function
|
MaapiCursor |
Maapi.newCursor(int tid,
ConfPath path)
Creates a cursor for an list specified by
fmt |
MaapiCursor |
Maapi.newCursor(int tid,
String fmt,
Object... arguments)
Creates a cursor for an list specified by
fmt |
void |
Maapi.performUpgrade(String[] loadpathdirs)
Note, This method is only applicable for Confd.
|
void |
Maapi.popd(int tid)
Pops the top position of the directory stack and changes directory
|
void |
Maapi.prepareTrans(int tid)
Prepares the transaction specified by transaction handle tid.
|
void |
Maapi.prepareTrans(int tid,
int flags)
Prepares the transaction specified by transaction handle tid.
|
void |
CLIInteraction.printf(String fmt,
Object... arguments)
Write to the CLI using printf formatting.
|
void |
Maapi.prioMessage(String to,
String message)
Send a high priority message to a specific user, a specific user session
or all users depending on the to parameter.
|
String |
CLIInteraction.prompt(String promptStr,
boolean echo)
Prompt user for a string.
|
String |
CLIInteraction.prompt(String promptStr,
boolean echo,
int timeout)
This function does the same as prompt(String promptStr), but also takes a
timeout parameter, which controls how long (in seconds) to wait for input
before aborting.
|
String |
CLIInteraction.promptOneOf(String promptStr,
String[] choice,
boolean echo)
Prompt user for one of the strings given in the choice parameter.
|
String |
CLIInteraction.promptOneOf(String promptStr,
String[] choice,
boolean echo,
int timeout)
This function does the same as promptOneOf(String promptStr, String[]
choice, boolean echo), but also takes a timeout parameter.
|
void |
Maapi.pushd(int tid,
String fmt,
Object... arguments)
Behaves like cd() with the exception that we can subsequently call popd()
and return to the previous position in the XML data tree.
|
<T extends ResultType> |
Maapi.queryStart(int th,
String expr,
String context,
int chunkSize,
int offset,
List<String> select,
Class<T> cls)
Initiate (or starts) a new XPath query attached to the
transaction given in
th . |
<T extends ResultType> |
Maapi.queryStart(int th,
String expr,
String context,
int chunkSize,
int offset,
List<String> select,
List<String> sort,
boolean reverseSortOrder,
Class<T> cls)
Initiate (or starts) a new XPath query attached to the
transaction given in
th . |
String |
CLIInteraction.readEOF(boolean echo)
Read a multi line string from the CLI.
|
String |
CLIInteraction.readEOF(boolean echo,
int timeout)
This function does the same as readEOF(boolean echo), but also takes a
timeout parameter, which indicates how long the user may be idle (in
seconds) before the reading is aborted.
|
void |
Maapi.reloadConfig()
Request that the daemon reloads its configuration files.
|
MaapiSchemas |
Maapi.reloadSchemas()
This method throws away any old MaapiSchemas container and downloads a
new from the server.
|
MaapiSchemas |
Maapi.reloadSchemas(String[] namespaceURIs)
This method throws away any old MaapiSchemas container and downloads a
new from the server.
|
ConfXMLParam[] |
Maapi.requestAction(ConfXMLParam[] params,
int nshash,
String fmt,
Object... arguments)
Same as
Maapi.requestAction(ConfXMLParam[], String, Object...)
Since actions are not associated with transactions, the
namespace hash nshash must be provided and the path
to the action, i.e. |
ConfXMLParam[] |
Maapi.requestAction(ConfXMLParam[] params,
String fmt,
Object... arguments)
Invokes an action defined in the data model annotated with
tailf:action (see tailf_yang_extensions(5)). |
ConfXMLParam[] |
Maapi.requestAction(List<ConfXMLParam> params,
int nshash,
String fmt,
Object... arguments) |
ConfXMLParam[] |
Maapi.requestAction(List<ConfXMLParam> params,
String fmt,
Object... arguments)
Same as
Maapi.requestAction(ConfXMLParam[], String, Object...)
with the difference that the params is List
instead of ConfXMLParam array. |
ConfXMLParam[] |
Maapi.requestActionTh(int tid,
ConfXMLParam[] params,
String fmt,
Object... arguments)
Same as
Maapi.requestAction(ConfXMLParam[], String, Object...)
with the difference that the fmt is not required to have a namespace
prefix in the root tag. |
ConfXMLParam[] |
Maapi.requestActionTh(int tid,
List<ConfXMLParam> params,
String fmt,
Object... arguments) |
void |
QueryResult.reset()
Reset/Rewind a running query so that it starts from the
beginning again.
|
void |
QueryResult.reset(int offset)
Reset/Rewind a running query to a specific offset.
|
long |
QueryResult.resultCount()
Get number of elements in the result.
|
void |
Maapi.revert(int tid)
Remove all changes in the transaction.
|
void |
Maapi.safeCreate(int tid,
ConfPath path)
Create a new list entity in the XML tree.
|
void |
Maapi.safeCreate(int tid,
String fmt,
Object... arguments)
Create a new entity in the XML tree.
|
void |
Maapi.safeDelete(int tid,
String fmt,
Object... arguments)
Deletes a node and all its children from the XML data tree.
|
ConfValue |
Maapi.safeGetElem(int tid,
ConfPath path)
Reads a value from the
path specified |
ConfValue |
Maapi.safeGetElem(int tid,
String fmt,
Object... arguments)
This reads a value from the path in fmt and returns the result.
|
ConfObject[] |
Maapi.safeGetObject(int tid,
String fmt,
Object... arguments)
This is a variant of getObject() that returns null if the object doesn't
exist
|
MaapiInputStream |
Maapi.saveConfig(int tid,
EnumSet<MaapiConfigFlag> flags)
Save the entire config in different formats.
|
MaapiInputStream |
Maapi.saveConfig(int tid,
EnumSet<MaapiConfigFlag> flags,
ConfPath path)
Save the subtree in different formats.
|
MaapiInputStream |
Maapi.saveConfig(int tid,
EnumSet<MaapiConfigFlag> flags,
String fmt,
Object... args)
Save the subtree in different formats, with ability to XPath Filtering.
|
void |
CLIInteraction.set(String parameter,
String value)
Set CLI session parameter.
|
void |
Maapi.setAttr(int tid,
ConfAttributeValue attr,
String fmt,
Object... args)
Set an attribute for a configuration node.
|
void |
Maapi.setComment(int tid,
String comment)
Set the "Comment" that is stored in the rollback file when a
transaction towards running is committed.
|
boolean |
Maapi.setDelayedWhen(int th,
boolean on)
This function enables/disables the "delayed when" mode of a transaction.
|
void |
Maapi.setElem(int tid,
ConfObject value,
ConfPath path)
Set value to a leaf node.
|
void |
Maapi.setElem(int tid,
ConfObject value,
String fmt,
Object... arguments)
Set value to a leaf node.
|
void |
Maapi.setElem(int tid,
String value,
ConfPath path)
Set value to a leaf node.
|
void |
Maapi.setElem(int tid,
String value,
String fmt,
Object... arguments)
Set value to a leaf node.
|
void |
Maapi.setFlags(int tid,
EnumSet<MaapiFlag> flags)
This method can modify some aspects of the read/write session, see
MaapiFlag The flags are an Enumset of
MaapiFlag |
void |
Maapi.setLabel(int tid,
String label)
Set the "Label" that is stored in the rollback file when a
transaction towards running is committed.
|
void |
Maapi.setNamespace(int tid,
int nsid) |
void |
Maapi.setNamespace(int tid,
String ns)
Before can invoke any of read or write functions, we must indicate which
namespace we are going to use.
|
void |
Maapi.setObject(int tid,
ConfObject[] values,
String fmt,
Object... arguments)
This writes a container object or a list entry object from the path in
fmt and returns the result.
|
void |
Maapi.setReadOnlyMode(boolean flag)
Control if the node should accept write transactions
|
void |
Maapi.setRunningDbStatus(int status)
Explicitly sets the systems notion of the consistency
state.
|
void |
Maapi.setUserSession(int usid)
Associate this Maapi instance with an already existing user session.
|
void |
Maapi.setValues(int th,
ConfXMLParam[] params,
ConfPath path)
Set arbitrary sub-elements of a container element in one bulk operation.
|
void |
Maapi.setValues(int th,
ConfXMLParam[] params,
String fmt,
Object... arguments)
Set arbitrary sub-elements of a container element in one bulk operation.
|
void |
Maapi.setValues(int th,
List<ConfXMLParam> params,
ConfPath path)
Set arbitrary sub-elements of a container element in one bulk operation.
|
void |
Maapi.setValues(int th,
List<ConfXMLParam> params,
String fmt,
Object... arguments)
Set arbitrary sub-elements of a container element in one bulk operation.
|
void |
Maapi.sharedCreate(int tid,
boolean createBackpointer,
ConfPath path)
This is the variant of create() to use from FASTMAP code.
|
void |
Maapi.sharedCreate(int tid,
ConfPath path) |
void |
Maapi.sharedCreate(int tid,
String fmt,
Object... arguments) |
void |
Maapi.sharedSetElem(int tid,
ConfObject value,
ConfPath path)
Set value to a leaf node from NCS FastMap code.
|
void |
Maapi.sharedSetElem(int tid,
ConfObject value,
String fmt,
Object... arguments)
Set value to a leaf node from NCS FastMap code
This method is the equivalent of setElem() except that it
can only be called from NCS FastMap service code.
|
void |
Maapi.sharedSetElem(int tid,
String value,
String fmt,
Object... arguments)
Set value to a leaf node from NCS FastMap code.
|
void |
Maapi.sharedSetValues(int th,
ConfXMLParam[] params,
boolean createBackpointer,
ConfPath path)
Set arbitrary sub-elements of a container element in one bulk operation
from NCS FastMap code.
|
void |
Maapi.sharedSetValues(int th,
ConfXMLParam[] params,
ConfPath path)
Set arbitrary sub-elements of a container element in one bulk operation
from NCS FastMap code.
|
void |
Maapi.sharedSetValues(int th,
ConfXMLParam[] params,
String fmt,
Object... arguments)
Set arbitrary sub-elements of a container element in one bulk operation
from NCS FastMap code.
|
void |
Maapi.sharedSetValues(int th,
List<ConfXMLParam> params,
ConfPath path)
Set arbitrary sub-elements of a container element in one bulk operation
from NCS FastMap code.
|
void |
Maapi.sharedSetValues(int th,
List<ConfXMLParam> params,
String fmt,
Object... arguments)
Set arbitrary sub-elements of a container element in one bulk operation
from NCS FastMap code.
|
void |
Maapi.snmpSendNotification(String notifName,
String notifyTarget,
String ctxName,
SnmpVarbind[] varbinds)
Send SNMP notification.
|
void |
Maapi.startPhase(int phase)
Once the ConfD/NCS daemon has been started in phase0 it is possible to
use this function to tell the daemon to proceed to startPhase 1 or 2.
|
void |
Maapi.startPhase(int phase,
boolean synchronous)
Once the ConfD/NCS daemon has been started in phase0 it is possible to
use this function to tell the daemon to proceed to start phase 1 or 2.
|
int |
Maapi.startTrans(int dbname,
int mode)
Start a new transaction towards the specified database
dbname with a transaction mode mode . |
int |
Maapi.startTrans(int dbname,
int mode,
String vendor,
String product,
String version,
String clientId) |
int |
Maapi.startTrans2(int dbname,
int mode,
int usid)
Start a new transaction towards database within an existing
user session specified by
usid . |
int |
Maapi.startTransFlags(int dbname,
int mode,
int usid,
EnumSet<MaapiFlag> flags)
Start a new transaction towards the specified database
dbname with a transaction mode mode with
additional flags to control read/write sessions. |
int |
Maapi.startTransInTrans(int mode,
int usid,
int th)
Start a new transaction within an existing user session and another
transaction as backend
|
void |
Maapi.startUserSession(String user,
InetAddress srcip,
String context,
String[] groups,
MaapiUserSessionFlag proto)
Establish a new user session on this
Maapi instance. |
void |
Maapi.startUserSession(String user,
InetAddress srcip,
String context,
String[] groups,
MaapiUserSessionFlag proto,
String vendor,
String product,
String version,
String clientId) |
void |
QueryResult.stop()
Stops the running query and makes the server end
free up any internal resources associated with the query.
|
void |
Maapi.stop()
Requests that the daemon stops, returns when daemon has stopped.
|
void |
Maapi.stop(boolean synchronous)
Stops the daemon.
|
void |
Maapi.sysMessage(String to,
String message)
Send a message to a specific user, a specific user session or all users
depending on the to parameter.
|
void |
Maapi.unlock(int db)
This function releases a lock previously acquired using the lock()
method.
|
void |
Maapi.unlockPartial(int lockId)
This methods releases a lock previously acquired using the lockPartial()
method.
|
void |
Maapi.userMessage(String to,
String message,
String sender)
Send a message to a specific user, a specific user session or all users
depending on the to parameter.
|
void |
Maapi.validateTrans(int tid,
boolean unlock,
boolean force)
Validates a transaction specified by transaction handle tid
|
void |
Maapi.waitStart(int phase)
Wait until the daemon has completed a certain start phase.
|
void |
Maapi.waitStarted()
Wait until the daemon is fully started, i.e.
|
void |
CLIInteraction.write(String str)
Write to the CLI.
|
ConfPath |
Maapi.xpath2kpath(String xpath)
Convert a XPath path to a ConfPath object.
|
void |
Maapi.xpathEval(int th,
MaapiXPathEvalResult xpatheval,
MaapiXPathEvalTrace xpathtrace,
String expr,
Object initstate,
String fmt,
Object... arguments)
Evaluated the xpath expression as supplied in by
expr . |
String |
Maapi.xpathEvalExpr(int th,
String expr,
MaapiXPathEvalTrace xpathtrace,
String fmt,
Object... arg)
Evaluate the xpath expression given in
expr parameter
and return the result as a string. |
Constructor and Description |
---|
Maapi(Socket socket)
Creates a new instance of
Maapi supplying a established
open socket to ConfD/NCS daemon. |
Modifier and Type | Class and Description |
---|---|
class |
IllegalParentNavuNodeException |
class |
NavuException
Exception raised from the navu package
|
class |
NoSuchNavuCaseException |
class |
NoSuchNavuChoiceException |
class |
NoSuchNavuNodeException |
Modifier and Type | Method and Description |
---|---|
static ConfException |
NavuException.mk(ConfResponse r) |
Modifier and Type | Method and Description |
---|---|
static NavuCdbSubscriber |
NavuCdbSubscribers.configSubscriber(Cdb cdb)
Deprecated.
Retrieve a new instance of a NavuCdbConfigSubscriber.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.configSubscriber(InetSocketAddress addr)
Deprecated.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.configSubscriber(String host,
int port)
Deprecated.
Retrieve a new instance of a NavuCdbConfigSubscriber.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.configSubscriber(String host,
int port,
String name)
Deprecated.
Retrieve a new instance of a NavuCdbConfigSubscriber.
|
static NavuNode |
KeyPath2NavuNode.getNode(ConfObject[] kp,
NavuContext ctx) |
static NavuNode |
KeyPath2NavuNode.getNode(ConfPath path,
NavuContext ctx) |
CdbSession |
NavuCdbSessionPoolable.getSession(Cdb rootCdb,
CdbDBType dbType,
EnumSet<CdbLockType> locks)
Returns a Cdb session to
dbType datastore with
the locks locks associated with the given Cdb. |
static NavuCdbSubscriber |
NavuCdbSubscribers.operSubscriber(Cdb cdb)
Deprecated.
Retrieve a new instance of a NavuCdbConfigSubscriber.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.operSubscriber(InetSocketAddress addr)
Deprecated.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.operSubscriber(InetSocketAddress addr,
String subName)
Deprecated.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.operSubscriber(String host,
int port)
Deprecated.
Retrieve a new instance of a NavuCdbOperSubscriber.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.operSubscriber(String host,
int port,
String name)
Deprecated.
Retrieve a new instance of a NavuCdbConfigSubscriber.
|
void |
NavuCdbSessionPoolable.removeAllForCdb(Cdb rootCdb)
Removes or closes all CdbSession associated with the supplied Cdb.
|
void |
NavuCdbSessionPoolable.removeAllSessions()
Removes all established session held by any Cdb.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.twoPhaseSubscriber(String host,
int port)
Deprecated.
Retrieve a new instance of a NavuCdbTwoPhaseSubscriber.
|
static NavuCdbSubscriber |
NavuCdbSubscribers.twoPhaseSubscriber(String host,
int port,
String name)
Deprecated.
|
Constructor and Description |
---|
NavuException(ConfException e) |
NavuException(String msg,
ConfException e) |
Modifier and Type | Class and Description |
---|---|
class |
NotifException
Exceptions raised from the notif package
|
Modifier and Type | Method and Description |
---|---|
static ConfException |
NotifException.mk(ConfResponse r) |
Modifier and Type | Method and Description |
---|---|
Notification |
Notif.read()
Read in the data.
|
Constructor and Description |
---|
Notif(Socket socket,
EnumSet<NotificationType> eventTypes)
Same functionality as for Notif(socket, eventTypes, cfg)
except that no extra configuration is expected to be set in eventTypes.
|
Notif(Socket socket,
EnumSet<NotificationType> eventTypes,
int heartbeatInterval)
Same functionality as for Notif(socket, eventTypes, cfg)
except that only heartbeat notifications are expected to require
to be configured
Since the ConfD/NCS daemon expects initialization within
5 seconds after a new socket is established this constructor should be
called directly for a new socket.
|
Notif(Socket socket,
EnumSet<NotificationType> eventTypes,
int heartbeatInterval,
int healthCheckInterval)
Same functionality as for Notif(socket, eventTypes, cfg)
except that only heartbeat and healtcheck notifications
are expected to require to be configured.
|
Notif(Socket socket,
EnumSet<NotificationType> eventTypes,
NotificationCfg cfg)
Creates a notification instance.
|
Modifier and Type | Method and Description |
---|---|
void |
ConfXMLParamToXML.serialize(Document doc,
OutputStream out)
Flushes the source document
doc to
the target out . |
void |
ConfXMLParamToXML.serialize(Document doc,
Writer out)
Flushes the source document
doc to
the target out |
Document |
ConfXMLParamToXML.toXML(ConfXMLParam[] param)
Transforms the supplied parameter
ConfXMLParam[]
to a document (Document ). |
Document |
ConfXMLParamToXML.toXML(ConfXMLParam[] param,
boolean includeEmpty)
Transforms the supplied parameter
ConfXMLParam[]
to a document (Document ). |
Document |
ConfXMLParamToXML.toXML(ConfXMLParam[] param,
String parentNode,
String parentURI)
Transforms the supplied
ConfXMLParam[]
to a document (Document ). |
Document |
ConfXMLParamToXML.toXML(ConfXMLParam[] param,
String parentNode,
String parentURI,
boolean includeEmpty)
Transforms the supplied parameter
ConfXMLParam[]
to a document (Document ). |
ConfXMLParam[] |
XMLtoConfXMLParam.toXMLParam()
Converts the xml to corresponding ConfXMLParam[]
The resulting ConfXMLParam[] is prepared for a getValues() call.
|
ConfXMLParam[] |
XMLtoConfXMLParam.toXMLParam(int mode)
Converts the xml to corresponding ConfXMLParam[]
The mode parameter controls whether this ConfXMLParam[] should be
prepared for a getValues() call or for a setValues() call using
using
XMLtoConfXMLParam.MODE_GET or XMLtoConfXMLParam.MODE_SET respectively. |
Constructor and Description |
---|
XMLtoConfXMLParam(String xml,
ConfPath path)
Main constructor that for initializing the
xml parser.
|