public class SynchronizedBuildCache<T extends DBObject>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SynchronizedBuildCache.BuildCacheListener<C extends DBObject>
Clients of SynchronizedBuildCache may choose to register an implementation
of BuildCacheListener for test and/or diagnostic purposes.
|
| Constructor and Description |
|---|
SynchronizedBuildCache() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T object)
Add the object to the cache.
|
boolean |
addBuildCacheListener(SynchronizedBuildCache.BuildCacheListener<T> listener)
Adds a listener to the build cache, which clients can use for
diagnostic or testing purposes.
|
boolean |
contains(T object)
Tests whether the given object is currently cached (i.e.
|
boolean |
remove(T object)
Removes the given object from the cache.
|
boolean |
removeBuildCacheListener(SynchronizedBuildCache.BuildCacheListener<T> listener)
Removes a listener for this build cache.
|
public boolean addBuildCacheListener(SynchronizedBuildCache.BuildCacheListener<T> listener)
listener - public boolean removeBuildCacheListener(SynchronizedBuildCache.BuildCacheListener<T> listener)
listener - public boolean add(T object) throws java.lang.InterruptedException
object - the DBObject instance to add to the cache. If null, this
method returns immediately.java.lang.InterruptedExceptionpublic boolean remove(T object)
object - the object to remove. Does nothing, if null.public boolean contains(T object)
object - the object to test