EventListener
, org.snmp4j.agent.mo.MOChangeListener
public class MOXodusPersistence extends Object implements org.snmp4j.agent.mo.MOChangeListener
Modifier and Type | Class | Description |
---|---|---|
static class |
MOXodusPersistence.SavingStrategy |
Constructor | Description |
---|---|
MOXodusPersistence(org.snmp4j.agent.MOServer[] moServers,
jetbrains.exodus.env.Environment environment) |
|
MOXodusPersistence(org.snmp4j.agent.MOServer[] moServers,
jetbrains.exodus.env.Environment environment,
MOXodusPersistence.SavingStrategy savingStrategy) |
Modifier and Type | Method | Description |
---|---|---|
void |
afterMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent) |
A change has been committed.
|
void |
afterPrepareMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent) |
A change has been prepared.
|
void |
beforeMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent) |
A ManagedObject change is being committed.
|
void |
beforePrepareMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent) |
A ManagedObject change is being prepared.
|
protected jetbrains.exodus.env.Store |
createStore(jetbrains.exodus.env.Transaction txn,
org.snmp4j.smi.OctetString context) |
|
static int[] |
decodeIndexOID(org.snmp4j.asn1.BERInputStream is,
org.snmp4j.asn1.BER.MutableByte type) |
|
protected List<org.snmp4j.smi.VariableBinding> |
decodeInstanceData(jetbrains.exodus.ByteIterable rawData) |
|
protected org.snmp4j.smi.VariableBinding |
decodeVariableBinding(org.snmp4j.asn1.BERInputStream inputStream) |
|
static void |
encodeIndexOID(OutputStream os,
byte type,
int[] oid) |
|
protected byte[] |
encodeInstanceData(List<org.snmp4j.smi.VariableBinding> vbs) |
|
protected void |
encodeVariableBinding(org.snmp4j.smi.VariableBinding vb,
org.snmp4j.asn1.BEROutputStream outputStream) |
|
protected Set<org.snmp4j.smi.OctetString> |
getContexts(org.snmp4j.agent.ManagedObject managedObject) |
|
jetbrains.exodus.env.Environment |
getEnvironment() |
|
static int |
getIndexOIDLength(int[] value) |
|
protected jetbrains.exodus.ByteIterable |
getKey(org.snmp4j.smi.OID oid,
org.snmp4j.smi.OID instanceID) |
|
protected org.snmp4j.smi.OID |
getKeyOid(jetbrains.exodus.ByteIterable key) |
|
org.snmp4j.agent.MOServer[] |
getMOServer() |
|
MOXodusPersistence.SavingStrategy |
getSavingStrategy() |
|
boolean |
isContinuousChangeListening() |
|
boolean |
isIgnoreChangeListenerEvents() |
|
void |
load(org.snmp4j.agent.io.ImportMode importMode) |
|
void |
registerChangeListenersWithServer(org.snmp4j.agent.MOServer moServer) |
|
protected void |
runSynchronization(Map<org.snmp4j.smi.OctetString,jetbrains.exodus.env.Store> stores,
jetbrains.exodus.env.Transaction txn,
org.snmp4j.agent.io.ImportMode importMode,
Iterator<Map.Entry<org.snmp4j.agent.MOScope,org.snmp4j.agent.ManagedObject>> moIterator) |
|
void |
save() |
|
void |
setIgnoreChangeListenerEvents(boolean ignoreChangeListenerEvents) |
|
void |
setSavingStrategy(MOXodusPersistence.SavingStrategy savingStrategy) |
|
void |
unregisterChangeListenersWithServer(org.snmp4j.agent.MOServer moServer) |
public MOXodusPersistence(org.snmp4j.agent.MOServer[] moServers, jetbrains.exodus.env.Environment environment)
public MOXodusPersistence(org.snmp4j.agent.MOServer[] moServers, jetbrains.exodus.env.Environment environment, MOXodusPersistence.SavingStrategy savingStrategy)
public MOXodusPersistence.SavingStrategy getSavingStrategy()
public void setSavingStrategy(MOXodusPersistence.SavingStrategy savingStrategy)
public boolean isIgnoreChangeListenerEvents()
public void setIgnoreChangeListenerEvents(boolean ignoreChangeListenerEvents)
public jetbrains.exodus.env.Environment getEnvironment()
public boolean isContinuousChangeListening()
public void registerChangeListenersWithServer(org.snmp4j.agent.MOServer moServer)
public void unregisterChangeListenersWithServer(org.snmp4j.agent.MOServer moServer)
public void load(org.snmp4j.agent.io.ImportMode importMode)
@NotNull protected jetbrains.exodus.env.Store createStore(jetbrains.exodus.env.Transaction txn, org.snmp4j.smi.OctetString context)
public org.snmp4j.agent.MOServer[] getMOServer()
protected void runSynchronization(Map<org.snmp4j.smi.OctetString,jetbrains.exodus.env.Store> stores, jetbrains.exodus.env.Transaction txn, org.snmp4j.agent.io.ImportMode importMode, Iterator<Map.Entry<org.snmp4j.agent.MOScope,org.snmp4j.agent.ManagedObject>> moIterator)
protected List<org.snmp4j.smi.VariableBinding> decodeInstanceData(jetbrains.exodus.ByteIterable rawData)
protected byte[] encodeInstanceData(List<org.snmp4j.smi.VariableBinding> vbs)
protected org.snmp4j.smi.VariableBinding decodeVariableBinding(org.snmp4j.asn1.BERInputStream inputStream) throws IOException
IOException
protected void encodeVariableBinding(org.snmp4j.smi.VariableBinding vb, org.snmp4j.asn1.BEROutputStream outputStream) throws IOException
IOException
protected jetbrains.exodus.ByteIterable getKey(org.snmp4j.smi.OID oid, org.snmp4j.smi.OID instanceID)
protected org.snmp4j.smi.OID getKeyOid(jetbrains.exodus.ByteIterable key)
public void save()
public static void encodeIndexOID(OutputStream os, byte type, int[] oid) throws IOException
IOException
public static int getIndexOIDLength(int[] value)
public static int[] decodeIndexOID(org.snmp4j.asn1.BERInputStream is, org.snmp4j.asn1.BER.MutableByte type) throws IOException
IOException
public void beforePrepareMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent)
beforePrepareMOChange
in interface org.snmp4j.agent.mo.MOChangeListener
changeEvent
- the change event object.public void afterPrepareMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent)
afterPrepareMOChange
in interface org.snmp4j.agent.mo.MOChangeListener
changeEvent
- the change event object.public void beforeMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent)
NOTE: Canceling the commit phase must be avoided. Setting a deny reason
has only an effect if DeniableEventObject.isDeniable()
returns
true
. Otherwise, you will need to throw an exception.
beforeMOChange
in interface org.snmp4j.agent.mo.MOChangeListener
changeEvent
- the change event object.public void afterMOChange(org.snmp4j.agent.mo.MOChangeEvent changeEvent)
afterMOChange
in interface org.snmp4j.agent.mo.MOChangeListener
changeEvent
- the change event object.protected Set<org.snmp4j.smi.OctetString> getContexts(org.snmp4j.agent.ManagedObject managedObject)
Copyright © 2018 SNMP4J.org. All rights reserved.