Interface CursorEncoder
public interface CursorEncoder
Strategy to encode and decode a String cursor to make it opaque for clients.
Typically applied to a
CursorStrategy via
CursorStrategy.withEncoder(CursorStrategy, CursorEncoder).- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionstatic CursorEncoderbase64()Return aCursorEncoderfor Base64 encoding and decoding.Decode the given cursor from external input.Encode the given cursor value for external use.static CursorEncoderReturn aCursorEncoderthat does not encode nor decode.
-
Method Details
-
encode
Encode the given cursor value for external use.- Parameters:
cursor- the cursor to encode- Returns:
- the encoded value
-
decode
Decode the given cursor from external input.- Parameters:
cursor- the raw cursor to decode- Returns:
- the decoded value
-
base64
Return aCursorEncoderfor Base64 encoding and decoding. -
noOpEncoder
Return aCursorEncoderthat does not encode nor decode.
-