Project Wonder 5.0

er.extensions.foundation
Class ERXLazyValue.TimedInvalidator

java.lang.Object
  extended by er.extensions.foundation.ERXLazyValue.TimedInvalidator
All Implemented Interfaces:
ERXLazyValue.Invalidator
Enclosing class:
ERXLazyValue<T>

public static class ERXLazyValue.TimedInvalidator
extends java.lang.Object
implements ERXLazyValue.Invalidator

TimedInvalidator specifies that the cached value should be invalidated after a specified duration. When the value is refetched, the timer is restarted.

Author:
mschrag

Constructor Summary
ERXLazyValue.TimedInvalidator(long timeToLiveInMillis)
          Constructs a new TimedInvalidator.
 
Method Summary
 void fetchedValue(java.lang.Object value)
          Called when the lazy value is refetched from the source.
 boolean shouldInvalidate()
          Returns whether or not the lazy value should invalidate its cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXLazyValue.TimedInvalidator

public ERXLazyValue.TimedInvalidator(long timeToLiveInMillis)
Constructs a new TimedInvalidator.

Parameters:
timeToLiveInMillis - the time-to-live in milliseconds
Method Detail

fetchedValue

public void fetchedValue(java.lang.Object value)
Description copied from interface: ERXLazyValue.Invalidator
Called when the lazy value is refetched from the source.

Specified by:
fetchedValue in interface ERXLazyValue.Invalidator
Parameters:
value - the new value

shouldInvalidate

public boolean shouldInvalidate()
Description copied from interface: ERXLazyValue.Invalidator
Returns whether or not the lazy value should invalidate its cache.

Specified by:
shouldInvalidate in interface ERXLazyValue.Invalidator
Returns:
whether or not the lazy value should invalidate its cache

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.