RefreshAheadCache instances.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | BATCH_SIZE_KEY
Properties key for the batch size attribute |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| public static final String | EVICT_ON_LOAD_MISS
Properties key for the batch size attribute |
| private boolean | |
| public static final String | MAX_BACKLOG
Properties key for the max backlog attribute |
| private int | |
| private String | |
| public static final String | NAME_KEY
Properties key for the batch size attribute |
| public static final String | NUMBER_OF_THREADS_KEY
Properties key for the batch size attribute |
| private int | |
| public static final String | TIME_TO_REFRESH_SECONDS_KEY
Properties key for the batch size attribute |
| private long | |
| private long | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public RefreshAheadCacheConfiguration | Returns: this configuration objectmaximum batch size batchSize)Fluently set the batch size for processing refresh requests. |
| public RefreshAheadCacheConfiguration | |
| private void | |
| public RefreshAheadCacheConfiguration | Returns: this configtrue to evict loadMissEvicts)Fluently set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache. |
| public RefreshAheadCacheConfiguration | Returns: this configurationInitialize this configuration from a |
| public int | |
| public int | Returns: max refresh backlog countGet the maximum number of backlog items allowed. |
| public String | |
| public int | Returns: number of threadsGet the number of threads used locally in this instance to process refresh requests |
| public long | |
| public long | |
| public boolean | isEvictOnLoadMiss()
Get whether no return for a key from all CacheLoaders will force an eviction prematurely from the underlying cache. |
| public RefreshAheadCacheConfiguration | maximumRefreshBacklogItems(int maximumRefreshBacklogItems)
Fluently set the maximum refresh backlog items. |
| public RefreshAheadCacheConfiguration | |
| public RefreshAheadCacheConfiguration | Returns: this config objectnumber of threads numberOfThreads)Fluently set the number of threads used locally in this instance to process refresh requests |
| public void | |
| public void | setEvictOnLoadMiss(boolean
true to evict loadMissEvicts)Set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache. |
| public void | |
| public void | |
| public void | setNumberOfThreads(int
number of threads numberOfThreads)Set the number of threads used locally in this instance to process refresh requests |
| public void | |
| public RefreshAheadCacheConfiguration | |
| public Properties | Returns: properties version of this configExpress this configuration as a |
| public String | |
| private void |
| BATCH_SIZE_KEY | back to summary |
|---|---|
| public static final String BATCH_SIZE_KEY Properties key for the batch size attribute | |
| batchSize | back to summary |
|---|---|
| private int batchSize | |
| DEFAULT_BACKLOG_MAX | back to summary |
|---|---|
| private static final int DEFAULT_BACKLOG_MAX | |
| DEFAULT_BATCHSIZE | back to summary |
|---|---|
| private static final int DEFAULT_BATCHSIZE | |
| DEFAULT_NUMBER_THREADS | back to summary |
|---|---|
| private static final int DEFAULT_NUMBER_THREADS | |
| EVICT_ON_LOAD_MISS | back to summary |
|---|---|
| public static final String EVICT_ON_LOAD_MISS Properties key for the batch size attribute | |
| evictOnLoadMiss | back to summary |
|---|---|
| private boolean evictOnLoadMiss | |
| MAX_BACKLOG | back to summary |
|---|---|
| public static final String MAX_BACKLOG Properties key for the max backlog attribute | |
| maximumRefreshBacklogItems | back to summary |
|---|---|
| private int maximumRefreshBacklogItems | |
| name | back to summary |
|---|---|
| private String name | |
| NAME_KEY | back to summary |
|---|---|
| public static final String NAME_KEY Properties key for the batch size attribute | |
| NUMBER_OF_THREADS_KEY | back to summary |
|---|---|
| public static final String NUMBER_OF_THREADS_KEY Properties key for the batch size attribute | |
| numberOfThreads | back to summary |
|---|---|
| private int numberOfThreads | |
| TIME_TO_REFRESH_SECONDS_KEY | back to summary |
|---|---|
| public static final String TIME_TO_REFRESH_SECONDS_KEY Properties key for the batch size attribute | |
| timeToRefreshMillis | back to summary |
|---|---|
| private long timeToRefreshMillis | |
| timeToRefreshSeconds | back to summary |
|---|---|
| private long timeToRefreshSeconds | |
| valid | back to summary |
|---|---|
| private volatile boolean valid | |
| RefreshAheadCacheConfiguration | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration() Create a default, valid configuration | |
| batchSize | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration batchSize(int batchSize) Fluently set the batch size for processing refresh requests.
| |
| build | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration build() Validate this configuration.
| |
| checkValid | back to summary |
|---|---|
| private void checkValid() | |
| evictOnLoadMiss | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration evictOnLoadMiss(boolean loadMissEvicts) Fluently set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache.
| |
| fromProperties | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration fromProperties(Properties properties) Initialize this configuration from a
| |
| getBatchSize | back to summary |
|---|---|
| public int getBatchSize() Get the batch size with which refresh requests will be processed.
| |
| getMaximumRefreshBacklogItems | back to summary |
|---|---|
| public int getMaximumRefreshBacklogItems() Get the maximum number of backlog items allowed. This is the max number of items that this local decorator will allow to be awaiting refresh at one time. If more requests are made than this, requests will begin to be thrown on the floor.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the name of this cache decorator
| |
| getNumberOfThreads | back to summary |
|---|---|
| public int getNumberOfThreads() Get the number of threads used locally in this instance to process refresh requests
| |
| getTimeToRefreshMillis | back to summary |
|---|---|
| public long getTimeToRefreshMillis() return the time to refresh in milliseconds. | |
| getTimeToRefreshSeconds | back to summary |
|---|---|
| public long getTimeToRefreshSeconds() Get the time to refresh in seconds
| |
| isEvictOnLoadMiss | back to summary |
|---|---|
| public boolean isEvictOnLoadMiss() Get whether no return for a key from all CacheLoaders will force an eviction prematurely from the underlying cache. | |
| maximumRefreshBacklogItems | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration maximumRefreshBacklogItems(int maximumRefreshBacklogItems) Fluently set the maximum refresh backlog items. | |
| name | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration name(String name) Fluently set the name of this cache decorator | |
| numberOfThreads | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration numberOfThreads(int numberOfThreads) Fluently set the number of threads used locally in this instance to process refresh requests
| |
| setBatchSize | back to summary |
|---|---|
| public void setBatchSize(int batchSize) Set the batch size for processing refresh requests.
| |
| setEvictOnLoadMiss | back to summary |
|---|---|
| public void setEvictOnLoadMiss(boolean loadMissEvicts) Set whether no return for a key from all CacheLoaders should force an eviction prematurely from the underlying cache.
| |
| setMaximumRefreshBacklogItems | back to summary |
|---|---|
| public void setMaximumRefreshBacklogItems(int maximumRefreshBacklogItems) Set the maximum refresh backlog items. This is the max number of items which can be queued for refresh processing; above this, keys that are candidates for refresh may be skipped. The correct setting for this will be deployment specific. Too low and refresh opportunities will be skipped; too high and refresh operations could come to dominate processing. | |
| setName | back to summary |
|---|---|
| public void setName(String name) Set the name of this cache decorator | |
| setNumberOfThreads | back to summary |
|---|---|
| public void setNumberOfThreads(int numberOfThreads) Set the number of threads used locally in this instance to process refresh requests
| |
| setTimeToRefreshSeconds | back to summary |
|---|---|
| public void setTimeToRefreshSeconds(long timeToRefreshSeconds) Set the time to refresh in seconds | |
| timeToRefreshSeconds | back to summary |
|---|---|
| public RefreshAheadCacheConfiguration timeToRefreshSeconds(long secs) Fluently set the time to refresh seconds
| |
| toProperties | back to summary |
|---|---|
| public Properties toProperties() Express this configuration as a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| validate | back to summary |
|---|---|
| private void validate() | |