ExpirationDateOverflowHandling (apache-cassandra API)
Date: 2018-02-14

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 and Description
    --- | ---
    `static class` | `ExpirationDateOverflowHandling.ExpirationDateOverflowPolicy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and 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 and Description
    `ExpirationDateOverflowHandling()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `computeLocalExpirationTime(int nowInSec, int timeToLive)` This method computes the `Cell.localDeletionTime()`, maybe capping to the maximum representable value which is `Cell.MAX_DELETION_TIME`.
    `static void` | `maybeApplyExpirationDateOverflowPolicy(CFMetaData metadata, int ttl, boolean isDefaultTTL)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

  - ### Constructor Detail

    - #### ExpirationDateOverflowHandling

          public ExpirationDateOverflowHandling()

  - ### Method Detail

    - #### maybeApplyExpirationDateOverflowPolicy

          public static void maybeApplyExpirationDateOverflowPolicy(CFMetaData metadata,
                                                                    int ttl,
                                                                    boolean isDefaultTTL)
                                                             throws InvalidRequestException

      Throws:
        `InvalidRequestException`

    - #### computeLocalExpirationTime

          public static int computeLocalExpirationTime(int nowInSec,
                                                       int timeToLive)

      This method computes the `Cell.localDeletionTime()`, maybe capping to the maximum representable value which is `Cell.MAX_DELETION_TIME`. Please note that the `ExpirationDateOverflowHandling.ExpirationDateOverflowPolicy` is applied during `maybeApplyExpirationDateOverflowPolicy(CFMetaData, int, boolean)`, so if the request was not denied it means its expiration date should be capped. See CASSANDRA-14092

Copyright © 2018 The Apache Software Foundation