@ThreadSafe public class PullUpValidUntilStage extends BaseIteratingStage<Element>
| Modifier and Type | Field and Description |
|---|---|
private long |
maxValidityDuration
The maximum amount of time, in milliseconds, a descriptor may be valid.
|
private long |
minValidityDuration
The minimum amount of time, in milliseconds, a descriptor may be valid .
|
| Constructor and Description |
|---|
PullUpValidUntilStage() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doExecute(Item<Element> item)
Processes a given Item.
|
long |
getMaximumValidityDuration()
Gets the maximum amount of time, in milliseconds, a descriptor may be valid.
|
long |
getMinimumValidityDuration()
Gets the minimum amount of time, in milliseconds, a descriptor may be valid.
|
protected Long |
getNearestValidUntil(Element descriptor)
Gets the shorts cache duration for a given entity and entities descriptor an all its descendant descriptors.
|
void |
setMaximumValidityDuration(long duration)
Sets the maximum amount of time, in milliseconds, a descriptor may be valid.
|
void |
setMinimumValidityDuration(long duration)
Sets the minimum amount of time, in milliseconds, a descriptor may be valid.
|
protected void |
setValidUntil(Element descriptor,
Long validUntil)
Sets the valid until instant on the given descriptor.
|
doExecuteexecute, getCollectionPredicate, setCollectionPredicatesetIddoInitialize, getIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedprivate long minValidityDuration
private long maxValidityDuration
public long getMinimumValidityDuration()
public void setMinimumValidityDuration(long duration)
duration - minimum amount of time, in milliseconds, a descriptor may be validpublic long getMaximumValidityDuration()
public void setMaximumValidityDuration(long duration)
duration - maximum amount of time, in milliseconds, a descriptor may be valid, must be greater than 0protected boolean doExecute(@Nonnull Item<Element> item) throws StageProcessingException
doExecute in class BaseIteratingStage<Element>item - Item on which to operateStageProcessingException - thrown if there is a problem with the stage processingprotected Long getNearestValidUntil(@Nonnull Element descriptor)
descriptor - descriptor from which to get the shortest cache durationprotected void setValidUntil(@Nonnull Element descriptor, @Nullable Long validUntil)
minValidityDuration then the instant of now + the minimum duration
is set. If the given validUntil is greater than now + maxValidityDuration then the instant of now + the
maximum duration is set. Otherwise the given instant is set.descriptor - entity or entities descriptor to receive the validUntil, never nullvalidUntil - validUntil time to be set on the given descriptorCopyright © 1999–2016. All rights reserved.