Class ContinuationToken
- java.lang.Object
-
- com.amazonaws.athena.connector.lambda.examples.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 Summary
Constructors Constructor Description ContinuationToken(int partition, int part)Basic constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContinuationTokendecode(String token)Decodes the provided String representation of a ContinuationToken into a ContinuationTokenstatic Stringencode(int partition, int part)Encodes the provided partition and part into a string representation of ContinuationTokenintgetPart()The part in this token.intgetPartition()The partition in this token.
-
-
-
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;
-
-