|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.Cache
public abstract class Cache
This class holds a Hashtable which is used by other classes to store and share AgentMibOperations ,Sessions, API etc across.
SnmpStore,
Serialized Form| Field Summary | |
|---|---|
(package private) static java.util.Hashtable |
cache
Static hashtable which holds all the resources required by the agent and related classes |
(package private) boolean |
debug
|
| Constructor Summary | |
|---|---|
protected |
Cache()
The no arg constructor which initialises the cache hashtable. |
| Method Summary | |
|---|---|
java.lang.Object |
getFromCache(java.lang.String key)
Gets the object corresponding to the key from the Cache hashtable. |
java.lang.Object |
getMibOperations()
Gets the miboperation object from the cache hashtable for key "MIBS" |
boolean |
isDebug()
To check the debug mode is set or not. |
void |
putInCache(java.lang.String key,
java.lang.Object toStore)
This method allows objects to be stored in the cache |
void |
setDebug(boolean val)
Setter flag for debug messages |
void |
setMibOperations(java.lang.Object mibOps)
Setter for MibOperations which is set by the first class which uses the AgentMibOperations for loading MIB modules |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static java.util.Hashtable cache
boolean debug
| Constructor Detail |
|---|
protected Cache()
| Method Detail |
|---|
public void putInCache(java.lang.String key,
java.lang.Object toStore)
key - The Key to usetoStore - The Object to storepublic java.lang.Object getFromCache(java.lang.String key)
key - the string to search in the hashtable.
public java.lang.Object getMibOperations()
public void setMibOperations(java.lang.Object mibOps)
mibOps - the mibOpertation objectpublic void setDebug(boolean val)
val - true to set debug false to unsetpublic boolean isDebug()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||