Class ContinuationToken


  • public class ContinuationToken
    extends Object
    All items in the "com.amazonaws.athena.connector.lambda.examples" that this class belongs to are part of an 'Example' connector. We do not recommend using any of the classes in this package directly. Instead you can/should copy and modify as needed.

    This class is used to define the continuation token used by doGetSplits as well as logic for serializing and deserializing said token.

    • Constructor Detail

      • ContinuationToken

        public ContinuationToken​(int partition,
                                 int part)
        Basic constructor.
        Parameters:
        partition - The last partition we processed.
        part - The next part to process.
    • Method Detail

      • getPartition

        public int getPartition()
        The partition in this token.
        Returns:
        int containing the last processed partition.
      • getPart

        public int getPart()
        The part in this token.
        Returns:
        int containing the next part to process.
      • decode

        public static ContinuationToken decode​(String token)
        Decodes the provided String representation of a ContinuationToken into a ContinuationToken
        Parameters:
        token - An encoded ContinuationToken.
        Returns:
        The ContinuationToken represented by the token string.
      • encode

        public static String encode​(int partition,
                                    int part)
        Encodes the provided partition and part into a string representation of ContinuationToken
        Parameters:
        partition - The last partition we processed.
        part - The next part to process.
        Returns:
        The String representation of a ContinuationToken;