Class MetadataUtils

    • Method Detail

      • addMetadata

        public static com.amazonaws.services.dynamodbv2.document.Item addMetadata​(com.amazonaws.services.dynamodbv2.document.Item item,
                                                                                  org.infinispan.metadata.InternalMetadata metadata)
        Adds Infinispan metadata to the specified DynamoDB item.

        Each metadata timestamp, if set (greater than -1) is encoded as long integer representing the number of milliseconds since the Unix spec:

        • created - "iat"
        • lifespan - "max"
        • max idle - "idl"
        • last used - "lat"
        Parameters:
        item - The DynamoDB item.
        metadata - The Infinispan metadata, null if not specified.
        Returns:
        The DynamoDB item.
      • addMetadata

        public static com.amazonaws.services.dynamodbv2.document.Item addMetadata​(com.amazonaws.services.dynamodbv2.document.Item item,
                                                                                  org.infinispan.metadata.InternalMetadata metadata,
                                                                                  boolean withTTL)
        Adds Infinispan metadata to the specified DynamoDB item.

        Each metadata timestamp, if set (greater than -1) is encoded as long integer representing the number of milliseconds since the Unix spec:

        • created - "iat"
        • lifespan - "max"
        • max idle - "idl"
        • last used - "lat"
        • automatic DynamoDB item expiration - "ttl"
        Parameters:
        item - The DynamoDB item.
        metadata - The Infinispan metadata, null if not specified.
        withTTL - true to include a "ttl" attribute as Unix Unix timestamp, with second precision, for automatic DynamoDB item expiration.
        Returns:
        The DynamoDB item.