Interface CouchbasePersistentEntity<T>
- All Superinterfaces:
Iterable<CouchbasePersistentProperty>
,PersistentEntity<T,
CouchbasePersistentProperty>
- All Known Implementing Classes:
BasicCouchbasePersistentEntity
public interface CouchbasePersistentEntity<T>
extends PersistentEntity<T,CouchbasePersistentProperty>
Represents an entity that can be persisted which contains 0 or more properties.
- Author:
- Michael Nitschinger
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
The threshold (inclusive) after which expiry should be expressed as a Unix UTC time. -
Method Summary
Modifier and TypeMethodDescriptionint
Deprecated.Returns the expiration time of the entity.boolean
Flag for using getAndTouch operations for reads, resetting the expiration (if one was set) when the entity is directly read (eg. findOne, findById).Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.springframework.data.mapping.PersistentEntity
doWithAll, doWithAssociations, doWithAssociations, doWithProperties, doWithProperties, findAnnotation, getIdentifierAccessor, getIdProperty, getName, getPersistenceConstructor, getPersistentProperties, getPersistentProperty, getPersistentProperty, getPropertyAccessor, getPropertyPathAccessor, getRequiredAnnotation, getRequiredIdProperty, getRequiredPersistentProperty, getRequiredVersionProperty, getType, getTypeAlias, getTypeInformation, getVersionProperty, hasIdProperty, hasVersionProperty, isAnnotationPresent, isConstructorArgument, isIdProperty, isImmutable, isNew, isVersionProperty, requiresPropertyPopulation
-
Field Details
-
TTL_IN_SECONDS_INCLUSIVE_END
static final long TTL_IN_SECONDS_INCLUSIVE_ENDThe threshold (inclusive) after which expiry should be expressed as a Unix UTC time.- See Also:
-
-
Method Details
-
getExpiry
Deprecated.Returns the expiration time of the entity.The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)
- Returns:
- the expiration time in correct Couchbase format.
-
getExpiryDuration
Duration getExpiryDuration()Returns the expiration time of the entity.The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)
- Returns:
- the expiration time Duration
-
isTouchOnRead
boolean isTouchOnRead()Flag for using getAndTouch operations for reads, resetting the expiration (if one was set) when the entity is directly read (eg. findOne, findById).- Returns:
- true if a direct read of the document should trigger a touch, resetting its expiration timer.
-