java.lang.Object | |
↳ | sun.management.snmp.util.SnmpTableCache |
![]() |
![]() |
This abstract class implements a weak cache that holds table data.
The table data is stored in an instance of
SnmpCachedData
, which is kept in a WeakReference
.
If the WeakReference is null or empty, the cached data is recomputed.
NOTE: This class is not synchronized, subclasses must implement the appropriate synchronization when needed.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
datas | A weak refernce holding cached table data. | ||||||||||
validity | Interval of time in ms during which the cached table data is considered valid. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a table handler that holds the table data.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the cached table data.
| |||||||||||
Returns the cached table data, if it is still valid,
or recompute it if it is obsolete.
| |||||||||||
true if the given cached table data is obsolete.
| |||||||||||
Recompute cached data.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Interval of time in ms during which the cached table data is considered valid.
Return a table handler that holds the table data. This method should return the cached table data if it is still valid, recompute it and cache the new value if it's not.
Returns the cached table data. Returns null if the cached data is obsolete, or if there is no cached data, or if the cached data was garbage collected.
Returns the cached table data, if it is still valid, or recompute it if it is obsolete.
When cache data is recomputed, store it in the weak reference,
unless validity
is 0: then the data will not be stored
at all.
This method calls isObsolete(SnmpCachedData)
to determine
whether the cached data is obsolete, and {
updateCachedDatas(Object)
to recompute it.
context | A context object. |
---|
true if the given cached table data is obsolete.
Recompute cached data.
context | A context object, as passed to
getTableDatas(Object)
|
---|