public class ExpiringValueCache<T> extends Object implements Serializable
The object placed in the cache will automatically be discarded after a timeout value.
Constructor and Description |
---|
ExpiringValueCache()
Default constructor.
|
ExpiringValueCache(long timeout)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the cache value
|
T |
get()
Get the cached object.
|
void |
put(T value)
Put a value into the cache.
|
public ExpiringValueCache()
public ExpiringValueCache(long timeout)
timeout
- Timeout in milliseconds before cached value is discardedpublic void put(T value)
value
- The object to store in the cachepublic T get()
public void clear()
Copyright © 2005–2016 Alfresco Software. All rights reserved.