@Deprecated public class NavuCdbOperSubscriber extends NavuCdbSubscribers implements NavuCdbSubscriber, Runnable
Note that this subscriber handles only CDB Oper data.
To create a NavuCdbOperSubscriber it is preferable to
use the method static factory method
NavuCdbSubscribers.operSubscriber(String,int).
There can be multiple registrations on a instance of a
NavuCdbOperSubscriber. Further the same instance
could be register to handle multiple subscription paths.
A registration of a user provided callback to this subscriber does not handles priorities and always sync with DONE_OPERATIONAL.
This class implements the runnable interface which means that
it will be submitted to the underlying ExecutorService
upon successfully call to subscriberStart().
| Modifier and Type | Method and Description |
|---|---|
NavuCdbSubscriber |
register(NavuCdbDiffIterate cb,
ConfPath path)
Deprecated.
Registers a subscription item onto the this
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications. |
NavuCdbSubscriber |
register(NavuCdbDiffIterate cb,
ConfPath path,
EnumSet<DiffIterateFlags> flags)
Deprecated.
Registers a subscription item onto the this
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications. |
NavuCdbSubscriber |
register(NavuCdbDiffIterate cb,
NavuNode node)
Deprecated.
Registers a subscription item onto the this
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications. |
NavuCdbSubscriber |
register(NavuCdbDiffIterate cb,
NavuNode node,
EnumSet<DiffIterateFlags> flags)
Deprecated.
Registers a subscription item onto the this
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications. |
void |
run()
Deprecated.
The implemented run method that the subscriber thread
will run when started.
|
void |
shutDownOnException(boolean shutdownonexc)
Deprecated.
Controls the shutdown behavior of this subscriber when the subscriber
receives a uncaught exception from one of its registered callbacks.
|
boolean |
subscriberStart()
Deprecated.
Starts a NavuCdbOperSubscriber , submit
this runnable into the underlying ExecutorService
if the NavuCdbConfigSubscribe is not already started.
|
awaitRunning, awaitStopped, configSubscriber, configSubscriber, configSubscriber, configSubscriber, executor, getIterationQueue, isRunning, isStopped, operSubscriber, operSubscriber, operSubscriber, operSubscriber, operSubscriber, registerStoppedHandler, subscriberStop, twoPhaseSubscriber, twoPhaseSubscriberequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitRunning, awaitStopped, executor, getIterationQueue, isRunning, isStopped, registerStoppedHandler, subscriberStoppublic NavuCdbSubscriber register(NavuCdbDiffIterate cb, ConfPath path) throws NavuException
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications.
If the keypath does not lead to a operational data
the method will throw NavuException and no subscription will
be done on the specified keypath path.
register in interface NavuCdbSubscribercb - user provided callback i.e implementation
of NavuCdbOperDiffIteratepath - to subscribe to for changesNavuException - if the path could not be registered with the
NavuCdbOperSubscriber. This is caused by erroneous path
i.e if the path does not point to Cdb oper data node.public NavuCdbSubscriber register(NavuCdbDiffIterate cb, ConfPath path, EnumSet<DiffIterateFlags> flags) throws NavuException
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications.
If the keypath does not lead to a operational data
the method will throw NavuException and no subscription
will be done on the specified keypath path.register in interface NavuCdbSubscribercb - user provided callback i.e implementation
of NavuCdbOperDiffIteratepath - to subscribe to for changesflags - user provided iterate flags for the registered user
callbackNavuException - if the path could not be registered with the
NavuCdbOperSubscriber. This is caused by erroneous path
i.e if the path does not point to Cdb oper data node.public NavuCdbSubscriber register(NavuCdbDiffIterate cb, NavuNode node) throws NavuException
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications.
If the NavuNode does not correspond to a operational data
the method will throw NavuException and no subscription
will be done on the specified NavuNode.register in interface NavuCdbSubscribercb - user provided callback i.e implementation
of NavuCdbOperDiffIteratenode - to subscribe to for changesNavuException - if the path could not be registered with the
NavuCdbOperSubscriber.
This is caused by erroneous path i.e if the path does not point to
Cdb oper data.public NavuCdbSubscriber register(NavuCdbDiffIterate cb, NavuNode node, EnumSet<DiffIterateFlags> flags) throws NavuException
NavuCdbOperSubscriber
with a given user provided callback that will be invoked on
Cdb notifications.
If the NavuNode does not correspond to a operational data
the method will throw NavuException and no subscription
will be done on the specified NavuNode.register in interface NavuCdbSubscribercb - user provided callback i.e implementation
of NavuCdbOperDiffIteratenode - to subscribe to for changesflags - user provided iterate flags for the registered user
callbackNavuException - if the path could not be registered with the
NavuCdbOperSubscriber.
This is caused by erroneous path i.e if the path does not point to
Cdb oper data node.public void run()
public void shutDownOnException(boolean shutdownonexc)
When a user callback throws unexpected exception that is not caught
by the callback the default behavior for a
NavuCdbConfigSubscriber is to sync with
CdbSubscriptionSyncType.DONE_SOCKET and stops
the subscriber and shutdown the underlying ExecutorService.
This method defines if the subscriber should stop when an uncaught exception from callback is thrown.
shutDownOnException in interface NavuCdbSubscribershutdownonexc - true/false whether this subscriber should stop
after a uncaught exception from one of the set of callbacks is thrown.public boolean subscriberStart()
After all the registration have been done
the subscriber must be started which submits this subscriber
to the underlying ExecutorService.
Returns true if this runnable was successfully submitted or false if this NavuCdbOperSubscriber was already started and this runnable was not submitted successfully.
subscriberStart in interface NavuCdbSubscriber