public class ExpiringConnectorCache<K> extends ConnectorCache<K>
false from the isValid() method.| Constructor and Description |
|---|
ExpiringConnectorCache(K key,
long timeToLive) |
| Modifier and Type | Method and Description |
|---|---|
long |
getExpireTime()
Returns the time (in milliseconds) after which this ConnectorCache is no longer valid.
|
boolean |
isValid()
Returns
false if the current time is past the expiration time for this ConnectorCache. |
clearCache, getCache, getKeypublic ExpiringConnectorCache(K key, long timeToLive)
key - the key by which this ConnectorCache will be cached in the connector cachetimeToLive - the relative time from now (in milliseconds) after which this ConnectorCache should no longer
be considered validpublic long getExpireTime()
public boolean isValid()
false if the current time is past the expiration time for this ConnectorCache. Returns true if this cache should be considered valid, false otherwise. This method will be
called by ConnectorCache.getCache(K, X, com.boomi.connector.util.ConnectorCacheFactory<K, C, X>) whenever a ConnectorCache is retrieved. If this method returns false, the
retrieved ConnectorCache will be discarded and a new one created via the ConnectorCacheFactory provided.
Default implementation always returns true.
isValid in class ConnectorCache<K>