SnmpProxyAdapter
public interface SnmpProxyCommitter
SnmpProxyCommitter
interface commit model changes to the
associated SNMP entity. Changes are committed atomically if they are put within the same change set.
Changes are queued until commitChanges(SnmpCommitListener)
is being called. Then all
queued changes are processed until no changes are left in the queue as it was at the time when
commitChanges(SnmpCommitListener)
has been called.Modifier and Type | Method | Description |
---|---|---|
void |
addChange(SnmpProxyObject proxyObject,
SnmpValuesChangeSet change) |
Adds a change on the specified proxy object to the queue.
|
TaskId |
commitChanges(SnmpCommitListener commitListener) |
Commit the changes in the current queue asynchronously in the background.
|
int |
getNumberOfPendingChanges() |
Gets the total number of changes in the queue (independently of a particular proxy object).
|
List<SnmpValuesChangeSet> |
removeAllChanges(SnmpProxyObject proxyObject) |
Remove all changes for a given proxy object.
|
SnmpValuesChangeSet |
removeLastChangeSet(SnmpProxyObject proxyObject) |
Remove the last change from the queue for the specified proxy object.
|
SnmpValuesChangeSet |
validateChange(SnmpValuesChangeSet change) |
Validate the change set provided.
|
SnmpValuesChangeSet validateChange(SnmpValuesChangeSet change)
change
- a change set.true
if the change set is valid that is, if all model values in the change can be mapped
(converted) to SNMP values.void addChange(SnmpProxyObject proxyObject, SnmpValuesChangeSet change)
proxyObject
- the proxy object that changed.change
- the values change set that describes the changes that should be applied to the proxy and its
remote object.SnmpValuesChangeSet removeLastChangeSet(SnmpProxyObject proxyObject)
proxyObject
- the proxy object for which the change to remove was added with
addChange(SnmpProxyObject, SnmpValuesChangeSet)
.null
if there is no such change.List<SnmpValuesChangeSet> removeAllChanges(SnmpProxyObject proxyObject)
proxyObject
- the proxy object for which all changes should be removed from the queue.TaskId commitChanges(SnmpCommitListener commitListener)
commitListener
- a callback listener for commit status events.int getNumberOfPendingChanges()
Copyright © 2020 SNMP4J.org. All rights reserved.