| 
 | ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.constructs.refreshahead.RefreshAheadCacheConfiguration
public class RefreshAheadCacheConfiguration
Fluent configuration class for RefreshAheadCache instances.
| Field Summary | |
|---|---|
| static String | BATCH_SIZE_KEYProperties key for the batch size attribute | 
| static String | EVICT_ON_LOAD_MISSProperties key for the batch size attribute | 
| static String | MAX_BACKLOGProperties key for the max backlog attribute | 
| static String | NAME_KEYProperties key for the batch size attribute | 
| static String | NUMBER_OF_THREADS_KEYProperties key for the batch size attribute | 
| static String | TIME_TO_REFRESH_SECONDS_KEYProperties key for the batch size attribute | 
| Constructor Summary | |
|---|---|
| RefreshAheadCacheConfiguration()Create a default, valid configuration | |
| Method Summary | |
|---|---|
|  RefreshAheadCacheConfiguration | batchSize(int batchSize)Fluently set the batch size for processing refresh requests. | 
|  RefreshAheadCacheConfiguration | build()Validate this configuration. | 
|  RefreshAheadCacheConfiguration | evictOnLoadMiss(boolean loadMissEvicts)Fluently set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache. | 
|  RefreshAheadCacheConfiguration | fromProperties(Properties properties)Initialize this configuration from a Propertiesobject. | 
|  int | getBatchSize()Get the batch size with which refresh requests will be processed. | 
|  int | getMaximumRefreshBacklogItems()Get the maximum number of backlog items allowed. | 
|  String | getName()Get the name of this cache decorator | 
|  int | getNumberOfThreads()Get the number of threads used locally in this instance to process refresh requests | 
|  long | getTimeToRefreshMillis()return the time to refresh in milliseconds. | 
|  long | getTimeToRefreshSeconds()Get the time to refresh in seconds | 
|  boolean | isEvictOnLoadMiss()Get whether no return for a key from all CacheLoaders will force an eviction prematurely from the underlying cache. | 
|  RefreshAheadCacheConfiguration | maximumRefreshBacklogItems(int maximumRefreshBacklogItems)Fluently set the maximum refresh backlog items. | 
|  RefreshAheadCacheConfiguration | name(String name)Fluently set the name of this cache decorator | 
|  RefreshAheadCacheConfiguration | numberOfThreads(int numberOfThreads)Fluently set the number of threads used locally in this instance to process refresh requests | 
|  void | setBatchSize(int batchSize)Set the batch size for processing refresh requests. | 
|  void | setEvictOnLoadMiss(boolean loadMissEvicts)Set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache. | 
|  void | setMaximumRefreshBacklogItems(int maximumRefreshBacklogItems)Set the maximum refresh backlog items. | 
|  void | setName(String name)Set the name of this cache decorator | 
|  void | setNumberOfThreads(int numberOfThreads)Set the number of threads used locally in this instance to process refresh requests | 
|  void | setTimeToRefreshSeconds(long timeToRefreshSeconds)Set the time to refresh in seconds | 
|  RefreshAheadCacheConfiguration | timeToRefreshSeconds(long secs)Fluently set the time to refresh seconds | 
|  Properties | toProperties()Express this configuration as a Propertiesobject. | 
|  String | toString() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final String BATCH_SIZE_KEY
public static final String NUMBER_OF_THREADS_KEY
public static final String NAME_KEY
public static final String TIME_TO_REFRESH_SECONDS_KEY
public static final String MAX_BACKLOG
public static final String EVICT_ON_LOAD_MISS
| Constructor Detail | 
|---|
public RefreshAheadCacheConfiguration()
| Method Detail | 
|---|
public RefreshAheadCacheConfiguration fromProperties(Properties properties)
Properties object. Will be
 validated before returning.
properties - 
public Properties toProperties()
Properties object.
public RefreshAheadCacheConfiguration build()
IllegalStateExceptionpublic long getTimeToRefreshMillis()
public RefreshAheadCacheConfiguration timeToRefreshSeconds(long secs)
secs - seconds
public long getTimeToRefreshSeconds()
public void setTimeToRefreshSeconds(long timeToRefreshSeconds)
timeToRefreshSeconds - public int getMaximumRefreshBacklogItems()
public RefreshAheadCacheConfiguration maximumRefreshBacklogItems(int maximumRefreshBacklogItems)
maximumRefreshBacklogItems - 
public void setMaximumRefreshBacklogItems(int maximumRefreshBacklogItems)
maximumRefreshBacklogItems - public int getNumberOfThreads()
public void setNumberOfThreads(int numberOfThreads)
numberOfThreads - number of threadspublic RefreshAheadCacheConfiguration numberOfThreads(int numberOfThreads)
numberOfThreads - number of threads
public int getBatchSize()
public void setBatchSize(int batchSize)
batchSize - maximum batch sizepublic RefreshAheadCacheConfiguration batchSize(int batchSize)
batchSize - maximum batch size
public String getName()
public void setName(String name)
name - public RefreshAheadCacheConfiguration name(String name)
name - 
public boolean isEvictOnLoadMiss()
public void setEvictOnLoadMiss(boolean loadMissEvicts)
loadMissEvicts - true to evictpublic RefreshAheadCacheConfiguration evictOnLoadMiss(boolean loadMissEvicts)
loadMissEvicts - true to evict
public String toString()
toString in class Object| 
 | ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||