public class ScheduledRefreshConfiguration extends Object implements Serializable, Cloneable
ScheduledRefreshCacheExtension. Can be
initialized from a Properties object. Currently, the use of a
clustered TerracottaJobStore is not supported.
This usage will be supported in the future.| Modifier and Type | Class and Description |
|---|---|
static class |
ScheduledRefreshConfiguration.PropKey
Property keys for configuration.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCHSIZE
Default batch size for key refresh processing.
|
static boolean |
DEFAULT_NULL_EVICTS
Default setting for null eviction.
|
static int |
DEFAULT_PARALLEL_JOB_COUNT
Default number of in process job count over the entire cluster.
|
static int |
DEFAULT_POLL_TIME_MS
Default polling timeout for monitoring refresh jobs.
|
static int |
DEFAULT_QUARTZ_THREADCOUNT
Default simultaneous Quartz thread count per node.
|
static boolean |
DEFAULT_USE_BULKLOAD
Default setting for using bulkload.
|
| Constructor and Description |
|---|
ScheduledRefreshConfiguration()
Create a default, valid configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ScheduledRefreshConfiguration |
batchSize(int batchSize)
Fluently set the batch size for processing refresh requests.
|
ScheduledRefreshConfiguration |
build()
Validate and mark this configuration good to use.
|
protected Object |
clone() |
ScheduledRefreshConfiguration |
cronExpression(String cronExpression)
Fluently set the cron expression Quartz will use for scheduling this
refresh job.
|
ScheduledRefreshConfiguration |
evictOnLoadMiss(boolean loadMissEvicts)
Fluently set whether now value found in all CacheLoaders will force an
eviction eviction prematurely from the underlying cache.
|
ScheduledRefreshConfiguration |
fromProperties(Properties properties)
Initialize this configuration from a
Properties object. |
int |
getBatchSize()
Get the batch size with which refresh requests will be processed.
|
String |
getCronExpression()
Return the string cron expression which will be passed to Quartz to
schedule the refresh.
|
Properties |
getExcessProperties()
Get any unrecognized properties that were passed to this config when
constructed via a Properties object.
|
String |
getJobStoreFactoryClass()
Gets the job store factory class.
|
String |
getKeyGeneratorClass()
Get the key generator class used to generate the list of keys to refresh.
|
int |
getParallelJobCount()
Gets parallel job count.
|
int |
getPollTimeMs()
Get the time interval the
OverseerJob will use to poll for job
completion. |
int |
getQuartzThreadCount()
Get the quartz thread count.
|
String |
getScheduledRefreshName()
Get an additional identifier used in addition to the cache manager and
cache name for this extension, and for the job scheduler, and job group.
|
String |
getTerracottaConfigUrl()
Gets terracotta config url.
|
boolean |
isEvictOnLoadMiss()
Get whether now value found in all CacheLoaders will force an eviction
prematurely from the underlying cache.
|
boolean |
isUseBulkload()
Get whether the cache will be put in bulk load mode prior to refresh.
|
boolean |
isValid()
is this configuration valid to use?.
|
ScheduledRefreshConfiguration |
jobStoreFactory(String className)
Fluently set the Job store factory.
|
ScheduledRefreshConfiguration |
keyGeneratorClass(String keyGeneratorClass)
Fluently set the key generator class used to generate the list of keys to
refresh.
|
ScheduledRefreshConfiguration |
parallelJobCount(int parallelJobCount)
Parallel job count.
|
ScheduledRefreshConfiguration |
pollTimeMs(int pollTimeMs)
Fluently set the time interval the
OverseerJob will use to poll
for job completion. |
ScheduledRefreshConfiguration |
quartzThreadCount(int quartzThreadCount)
Fluently set the Quartz thread count.
|
ScheduledRefreshConfiguration |
scheduledRefreshName(String part)
Fluently set an additional identifier used in addition to the cache
manager and cache name for this extension, and for the job scheduler, and
job group.
|
void |
setBatchSize(int batchSize)
Set the batch size for processing refresh requests.
|
void |
setCronExpression(String cronExpression)
Set the cron expression Quartz will use for scheduling this refresh job.
|
void |
setEvictOnLoadMiss(boolean loadMissEvicts)
Set whether now value found in all CacheLoaders will force an eviction
prematurely from the underlying cache.
|
void |
setJobStoreFactoryClassName(String className)
Sets the job store factory class name.
|
void |
setKeyGeneratorClass(String keyGeneratorClass)
Set the key generator class used to generate the list of keys to refresh.
|
void |
setParallelJobCount(int parallelJobCount)
Sets parallel job count.
|
void |
setPollTimeMs(int pollTimeMs)
Set the time interval the
OverseerJob will use to poll for job
completion. |
void |
setQuartzThreadCount(int quartzThreadCount)
Set the Quartz thread count.
|
void |
setScheduledRefreshName(String part)
Set an additional identifier used in addition to the cache manager and
cache name for this extension, and for the job scheduler, and job group.
|
void |
setTerracottaConfigUrl(String terracottaConfigUrl)
Sets terracotta config url.
|
void |
setUseBulkload(boolean useBulkload)
Set the flag to use bulk load for refreshing the keys.
|
ScheduledRefreshConfiguration |
terracottaConfigUrl(String terracottaConfigUrl)
Set the Terracotta config url, fluently.
|
Properties |
toProperties()
Express this configuration as a
Properties object. |
String |
toString() |
ScheduledRefreshConfiguration |
useBulkload(boolean yes)
Fluently set the bulk load flag.
|
void |
validate()
Validate this configuration.
|
public static final boolean DEFAULT_NULL_EVICTS
public static final boolean DEFAULT_USE_BULKLOAD
public static final int DEFAULT_BATCHSIZE
public static final int DEFAULT_QUARTZ_THREADCOUNT
public static final int DEFAULT_PARALLEL_JOB_COUNT
public static final int DEFAULT_POLL_TIME_MS
public ScheduledRefreshConfiguration()
public ScheduledRefreshConfiguration fromProperties(Properties properties)
Properties object. Will be
validated before returning.properties - the propertiespublic Properties toProperties()
Properties object.public ScheduledRefreshConfiguration build()
public void validate()
public boolean isValid()
public int getBatchSize()
public void setBatchSize(int batchSize)
batchSize - maximum batch sizepublic ScheduledRefreshConfiguration batchSize(int batchSize)
batchSize - maximum batch sizepublic boolean isUseBulkload()
public void setUseBulkload(boolean useBulkload)
useBulkload - the new use bulkloadpublic ScheduledRefreshConfiguration useBulkload(boolean yes)
yes - the yespublic String getCronExpression()
public void setCronExpression(String cronExpression)
cronExpression - the new cron expressionpublic ScheduledRefreshConfiguration cronExpression(String cronExpression)
cronExpression - the cron expressionpublic int getQuartzThreadCount()
public void setQuartzThreadCount(int quartzThreadCount)
quartzThreadCount - the new quartz thread countpublic ScheduledRefreshConfiguration quartzThreadCount(int quartzThreadCount)
quartzThreadCount - the quartz thread countpublic String getKeyGeneratorClass()
ScheduledRefreshKeyGenerator classpublic void setKeyGeneratorClass(String keyGeneratorClass)
keyGeneratorClass - the new key generator classpublic ScheduledRefreshConfiguration keyGeneratorClass(String keyGeneratorClass)
keyGeneratorClass - the key generator classpublic String getScheduledRefreshName()
public void setScheduledRefreshName(String part)
part - the new unique name partpublic ScheduledRefreshConfiguration scheduledRefreshName(String part)
part - unique identifier used to distinguish this scheduled refresh
instance from others on the same cachepublic boolean isEvictOnLoadMiss()
public void setEvictOnLoadMiss(boolean loadMissEvicts)
loadMissEvicts - true to evictpublic ScheduledRefreshConfiguration evictOnLoadMiss(boolean loadMissEvicts)
loadMissEvicts - true to evictpublic int getPollTimeMs()
OverseerJob will use to poll for job
completion.JobStore in order to schedule the next
batch of keys.public void setPollTimeMs(int pollTimeMs)
OverseerJob will use to poll for job
completion.pollTimeMs - time in milliseconds the controlling job will poll the
scheduler's JobStore in order to schedule
the next batch of keys.public ScheduledRefreshConfiguration pollTimeMs(int pollTimeMs)
OverseerJob will use to poll
for job completion.pollTimeMs - time in milliseconds the controlling job will poll the
scheduler'sJobStore in order to
schedule the next batch of keys.public String getJobStoreFactoryClass()
public void setJobStoreFactoryClassName(String className)
className - the new job store factory class namepublic ScheduledRefreshConfiguration jobStoreFactory(String className)
className - the class namepublic Properties getExcessProperties()
protected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void setTerracottaConfigUrl(String terracottaConfigUrl)
ScheduledRefreshTerracottaJobStoreFactory or null.terracottaConfigUrl - the terracotta config urlpublic ScheduledRefreshConfiguration terracottaConfigUrl(String terracottaConfigUrl)
terracottaConfigUrl - the terracotta config urlpublic String getTerracottaConfigUrl()
public void setParallelJobCount(int parallelJobCount)
parallelJobCount - the parallel job countpublic ScheduledRefreshConfiguration parallelJobCount(int parallelJobCount)
parallelJobCount - the parallel job countpublic int getParallelJobCount()
Copyright © 2003–2024 Terracotta, Inc.. All rights reserved.