public class LocalTransaction extends Object
LocalTransaction
holds changes, error status, and target information
for a SNMP transaction.Constructor | Description |
---|---|
LocalTransaction(org.snmp4j.Target target) |
Create a new transaction for a specific SNMP
Target . |
Modifier and Type | Method | Description |
---|---|---|
void |
addUpdate(SnmpValuesChangeSet changeSet) |
Adds a value change set to this transaction.
|
List<SnmpValuesChangeSet> |
getCommitted() |
Gets the list of (successfully) committed changes.
|
int |
getErrorIndex() |
|
SnmpErrorStatus |
getErrorStatus() |
Gets the SNMP error status of the transaction.
|
List<org.snmp4j.smi.VariableBinding> |
getFailedVariableBindings() |
Gets the list of failed variable bindings (new values that could not applied to an error).
|
Queue<SnmpValuesChangeSet> |
getPending() |
Gets the queue of pending
SnmpValuesChangeSet s. |
org.snmp4j.Target |
getTarget() |
Gets the SNMP target of this transaction.
|
boolean |
isSuccess() |
After this transaction completed, this method indicates whether there a failed change sets or not.
|
void |
setErrorIndex(int errorIndex) |
|
void |
setSnmpErrorStatus(SnmpErrorStatus snmpErrorStatus) |
|
String |
toString() |
public LocalTransaction(org.snmp4j.Target target)
Target
.target
- the target SNMP entity subject for this transaction.public org.snmp4j.Target getTarget()
Target
instance.public Queue<SnmpValuesChangeSet> getPending()
SnmpValuesChangeSet
s.public List<SnmpValuesChangeSet> getCommitted()
SnmpValuesChangeSet
instances. If empty, no changes
have been successfully committed yet. Failed changes will be reported by getFailedVariableBindings()
.public void addUpdate(SnmpValuesChangeSet changeSet)
changeSet
- a value change set to include in a future commit.public boolean isSuccess()
true
if there are failed value change sets.public SnmpErrorStatus getErrorStatus()
SnmpErrorStatus
instance that represents the status of the SNMP operation(s)
used to execute this transaction.public List<org.snmp4j.smi.VariableBinding> getFailedVariableBindings()
VariableBinding
instances.public int getErrorIndex()
public void setErrorIndex(int errorIndex)
public void setSnmpErrorStatus(SnmpErrorStatus snmpErrorStatus)
Copyright © 2020 SNMP4J.org. All rights reserved.