| Constructor and Description |
|---|
DOReaderCache()
create a new
DOReaderCache instance |
| Modifier and Type | Method and Description |
|---|---|
DOReader |
get(String pid)
get an
DOReader from the cache |
void |
put(DOReader reader)
add a new entry to the cache
|
void |
remove(String pid)
remove an entry from the cache
|
void |
removeExpired()
remove expired entries from the cache
|
void |
run()
TimerTask implementation to be used a managed Thread by the
spring framework |
void |
setMaxEntries(int maxEntries)
set the max number of entries the cache can hold
|
void |
setMaxSeconds(int maxSeconds)
set the maximal time in seconds an object should live in the cache
|
cancel, scheduledExecutionTimepublic DOReaderCache()
DOReaderCache instancepublic void setMaxSeconds(int maxSeconds)
maxSeconds - the seconds objects will live in the cache before expiringpublic void setMaxEntries(int maxEntries)
maxEntries - the number of entriespublic final void put(DOReader reader)
reader - the DOReader to be cachedpublic final void remove(String pid)
pid - the entry's pidpublic void run()
TimerTask implementation to be used a managed Thread by the
spring frameworkpublic final void removeExpired()
Copyright © 2013 DuraSpace. All Rights Reserved.