T - the type of the objects to cachepublic class Cache<T> extends Object
| Constructor and Description |
|---|
Cache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all objects from the cache.
|
void |
delete(long handle)
Removes the object with the given handle from the cache.
|
T |
get(long handle)
Gets an object with the given handle from the cache, or
null if the is no object for that handle. |
void |
store(long handle,
T value)
Stores an object in the cache using the given handle for later retrieval.
|
public void store(long handle,
T value)
handle - the handle used for retrievalvalue - the value to storepublic T get(long handle)
null if the is no object for that handle.handle - the handle used for retrievalnull otherwise.public void delete(long handle)
handle - the handle used for retrievalpublic void clear()
Copyright © 2020. All rights reserved.