public static class DefaultSourceFactory.Builder extends Object
SourceFactory
instances.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_FILE_LAST_MODIFIED_TRACKING_LATENCY_MS
default latency for tracking file last modified (1000ms = 1 second).
|
static long |
DEFAULT_URL_TRACKING_LATENCY_MS
default latency for tracking URL content (60000ms = one minute).
|
Constructor and Description |
---|
Builder()
constructor.
|
Modifier and Type | Method and Description |
---|---|
DefaultSourceFactory |
build()
builds an instance of
DefaultSourceFactory . |
long |
getFileLastModifiedTrackingLatencyMs()
gets latency for tracking file last modified of file sources.
|
long |
getUrlTrackingLatencyMs()
gets latency for tracking URL content.
|
boolean |
isTrackFileSourceLastModified()
gets whether to track (cache) file source last modified, default is not to track.
|
boolean |
isTrackTextSourceIds()
gets whether to track (cache) text source IDs, default is not to track.
|
boolean |
isTrackUrlContent()
gets whether to track URL content.
|
DefaultSourceFactory.Builder |
setFileLastModifiedTrackingLatencyMs(long fileLastModifiedTrackingLatencyMs)
sets latency for tracking file last modified of file sources,
defaults is
DEFAULT_FILE_LAST_MODIFIED_TRACKING_LATENCY_MS . |
DefaultSourceFactory.Builder |
setTrackFileSourceLastModified(boolean trackFileSourceLastModified)
sets whether to track (cache) file source last modified, default is not to track.
|
DefaultSourceFactory.Builder |
setTrackTextSourceIds(boolean trackTextSourceIds)
sets whether to track (cache) text source IDs, default is not to track.
|
DefaultSourceFactory.Builder |
setTrackUrlContent(boolean trackUrlContent)
sets whether to track URL content, default is not to track,
i.e. to consider URL content static.
|
DefaultSourceFactory.Builder |
setUrlTrackingLatencyMs(long urlTrackingLatencyMs)
sets latency for tracking URL content, defaults is
DEFAULT_URL_TRACKING_LATENCY_MS . |
public static final long DEFAULT_URL_TRACKING_LATENCY_MS
public static final long DEFAULT_FILE_LAST_MODIFIED_TRACKING_LATENCY_MS
public DefaultSourceFactory.Builder setTrackTextSourceIds(boolean trackTextSourceIds)
trackTextSourceIds
- whether to track (cache) text source IDsIllegalStateException
- if the builder had already been used to create an instancepublic DefaultSourceFactory.Builder setTrackFileSourceLastModified(boolean trackFileSourceLastModified)
trackFileSourceLastModified
- whether to track (cache) file source last modifiedIllegalStateException
- if the builder had already been used to create an instancepublic DefaultSourceFactory.Builder setFileLastModifiedTrackingLatencyMs(long fileLastModifiedTrackingLatencyMs)
DEFAULT_FILE_LAST_MODIFIED_TRACKING_LATENCY_MS
.
Only has an effect if also set to track file source last modified.
fileLastModifiedTrackingLatencyMs
- latency for tracking file last modified of file sourcesIllegalStateException
- if the builder had already been used to create an instancepublic DefaultSourceFactory.Builder setTrackUrlContent(boolean trackUrlContent)
trackUrlContent
- whether to track URL contentIllegalStateException
- if the builder had already been used to create an instancepublic DefaultSourceFactory.Builder setUrlTrackingLatencyMs(long urlTrackingLatencyMs)
DEFAULT_URL_TRACKING_LATENCY_MS
.
Only has an effect if also set to track URL content.
urlTrackingLatencyMs
- latency for tracking URL contentIllegalStateException
- if the builder had already been used to create an instancepublic boolean isTrackTextSourceIds()
public boolean isTrackFileSourceLastModified()
public long getFileLastModifiedTrackingLatencyMs()
public boolean isTrackUrlContent()
public long getUrlTrackingLatencyMs()
public DefaultSourceFactory build()
DefaultSourceFactory
.