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 classExpirationDateOverflowHandling.ExpirationDateOverflowPolicy
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAXIMUM_EXPIRATION_DATE_EXCEEDED_REJECT_MESSAGEstatic java.lang.StringMAXIMUM_EXPIRATION_DATE_EXCEEDED_WARNINGstatic ExpirationDateOverflowHandling.ExpirationDateOverflowPolicypolicy
-
Constructor Summary
Constructors Constructor Description ExpirationDateOverflowHandling()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcomputeLocalExpirationTime(int nowInSec, int timeToLive)This method computes theCell.localDeletionTime(), maybe capping to the maximum representable value which isCell.MAX_DELETION_TIME.static voidmaybeApplyExpirationDateOverflowPolicy(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 int computeLocalExpirationTime(int nowInSec, int timeToLive)This method computes theCell.localDeletionTime(), maybe capping to the maximum representable value which isCell.MAX_DELETION_TIME. Please note that theExpirationDateOverflowHandling.ExpirationDateOverflowPolicyis 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
-
-