public static enum JCacheConfig.ExpiryPolicy extends Enum<JCacheConfig.ExpiryPolicy>
Enum Constant and Description |
---|
ACCESSED
An
ExpiryPolicy that defines the expiry Duration
of a Cache Entry based on the last time it was accessed. |
CREATED
An
ExpiryPolicy that defines the expiry Duration
of a Cache Entry based on when it was created. |
ETERNAL
An eternal
ExpiryPolicy specifies that Cache Entries
won't expire. |
MODIFIED
An
ExpiryPolicy that defines the expiry Duration
of a Cache Entry based on the last time it was updated. |
TOUCHED
An
ExpiryPolicy that defines the expiry Duration
of a Cache Entry based on when it was last touched. |
Modifier and Type | Method and Description |
---|---|
javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
getFactory(javax.cache.expiry.Duration duration) |
static JCacheConfig.ExpiryPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JCacheConfig.ExpiryPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JCacheConfig.ExpiryPolicy TOUCHED
ExpiryPolicy
that defines the expiry Duration
of a Cache Entry based on when it was last touched. A touch includes
creation, update or access.public static final JCacheConfig.ExpiryPolicy ACCESSED
ExpiryPolicy
that defines the expiry Duration
of a Cache Entry based on the last time it was accessed. Accessed
does not include a cache update.public static final JCacheConfig.ExpiryPolicy CREATED
ExpiryPolicy
that defines the expiry Duration
of a Cache Entry based on when it was created. An update does not reset
the expiry time.public static final JCacheConfig.ExpiryPolicy ETERNAL
ExpiryPolicy
specifies that Cache Entries
won't expire. This however doesn't mean they won't be evicted if an
underlying implementation needs to free-up resources where by it may
choose to evict entries that are not due to expire.public static final JCacheConfig.ExpiryPolicy MODIFIED
ExpiryPolicy
that defines the expiry Duration
of a Cache Entry based on the last time it was updated. Updating
includes created and changing (updating) an entry.public static JCacheConfig.ExpiryPolicy[] values()
for (JCacheConfig.ExpiryPolicy c : JCacheConfig.ExpiryPolicy.values()) System.out.println(c);
public static JCacheConfig.ExpiryPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> getFactory(javax.cache.expiry.Duration duration)
Copyright © 2013-2018–2019 SeedStack. All rights reserved.