public interface ComponentTracker<C>
endOfLife(String) in which case they will linger for a few seconds
and then be removed.| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_COMPONENTS
By default an unlimited number of elements can be tracked.
|
static int |
DEFAULT_TIMEOUT
The default timeout duration is 30 minutes
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<C> |
allComponents()
Returns the collection of all components tracked by this instance.
|
java.util.Set<java.lang.String> |
allKeys()
Set of all keys in this tracker in no particular order.
|
void |
endOfLife(java.lang.String key)
Mark component identified by 'key' as having reached its end-of-life.
|
C |
find(java.lang.String key)
Find the component identified by 'key', without updating the timestamp.
|
int |
getComponentCount()
Returns the number of components tracked.
|
C |
getOrCreate(java.lang.String key,
long timestamp)
Get the component identified by 'key', updating its timestamp in the
process.
|
void |
removeStaleComponents(long now)
Remove components which are deemed stale.
|
static final int DEFAULT_TIMEOUT
static final int DEFAULT_MAX_COMPONENTS
int getComponentCount()
C find(java.lang.String key)
key - C getOrCreate(java.lang.String key, long timestamp)
key - timestamp - void removeStaleComponents(long now)
If the number of components exceeds, getComponentCount(),
components in excess will be removed.
Depending on the component type, components will be cleared or stopped (as appropriate) right before removal.
now - current time in millisecondsvoid endOfLife(java.lang.String key)
key - java.util.Collection<C> allComponents()
java.util.Set<java.lang.String> allKeys()
Copyright © 2010 - 2023 Adobe. All Rights Reserved