Package org.apache.cassandra.db
Class ExpirationDateOverflowHandling
- java.lang.Object
-
- org.apache.cassandra.db.ExpirationDateOverflowHandling
-
public class ExpirationDateOverflowHandling extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExpirationDateOverflowHandling.ExpirationDateOverflowPolicy
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MAXIMUM_EXPIRATION_DATE_EXCEEDED_REJECT_MESSAGE
static java.lang.String
MAXIMUM_EXPIRATION_DATE_EXCEEDED_WARNING
static ExpirationDateOverflowHandling.ExpirationDateOverflowPolicy
policy
-
Constructor Summary
Constructors Constructor Description ExpirationDateOverflowHandling()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
computeLocalExpirationTime(long nowInSec, int timeToLive)
This method computes theCell.localDeletionTime()
, maybe capping to the maximum representable value which isCell.MAX_DELETION_TIME
.static void
maybeApplyExpirationDateOverflowPolicy(TableMetadata metadata, int ttl, boolean isDefaultTTL)
-
-
-
Field Detail
-
policy
public static ExpirationDateOverflowHandling.ExpirationDateOverflowPolicy policy
-
MAXIMUM_EXPIRATION_DATE_EXCEEDED_WARNING
public static final java.lang.String MAXIMUM_EXPIRATION_DATE_EXCEEDED_WARNING
- See Also:
- Constant Field Values
-
MAXIMUM_EXPIRATION_DATE_EXCEEDED_REJECT_MESSAGE
public static final java.lang.String MAXIMUM_EXPIRATION_DATE_EXCEEDED_REJECT_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
maybeApplyExpirationDateOverflowPolicy
public static void maybeApplyExpirationDateOverflowPolicy(TableMetadata metadata, int ttl, boolean isDefaultTTL) throws InvalidRequestException
- Throws:
InvalidRequestException
-
computeLocalExpirationTime
public static long computeLocalExpirationTime(long nowInSec, int timeToLive)
This method computes theCell.localDeletionTime()
, maybe capping to the maximum representable value which isCell.MAX_DELETION_TIME
. Please note that theExpirationDateOverflowHandling.ExpirationDateOverflowPolicy
is applied duringmaybeApplyExpirationDateOverflowPolicy(org.apache.cassandra.schema.TableMetadata, int, boolean)
, so if the request was not denied it means its expiration date should be capped. See CASSANDRA-14092
-
-