public interface DynamoDBItemTransformer<K,V>
To specify an entry transformer for a given Infinispan cache that is
backed by a DynamoDB store, provide its class name to the
store configuration
.
Modifier and Type | Method and Description |
---|---|
String |
getHashKeyAttributeName()
Returns the DynamoDB hash key attribute name.
|
String |
getTableName()
Returns the base name of the DynamoDB table.
|
String |
resolveHashKey(K key)
Resolves the DynamoDB hash key (of scalar attribute type string) for
the specified Infinispan entry key.
|
com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> |
toInfinispanEntry(com.amazonaws.services.dynamodbv2.document.Item item)
Transforms the specified DynamoDB item to an Infinispan entry (key /
value / metadata triple).
|
com.amazonaws.services.dynamodbv2.document.Item |
toItem(com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
Transforms the specified Infinispan entry (key / value pair with
optional metadata) to a DynamoDB item.
|
String getTableName()
table-prefix
to the base name.String getHashKeyAttributeName()
String resolveHashKey(K key)
key
- The Infinispan entry key. Not null
.com.amazonaws.services.dynamodbv2.document.Item toItem(com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> infinispanEntry)
Example:
Infinispan entry:
uid=cae7t
,
givenName=Alice
, surname=Adams
and
[email protected]
.
Resulting DynamoDB item:
uid: cae7t (key) surname: Adams given_name: Alice email: [email protected]
infinispanEntry
- The Infinispan entry. Not null
.com.nimbusds.infinispan.persistence.common.InfinispanEntry<K,V> toInfinispanEntry(com.amazonaws.services.dynamodbv2.document.Item item)
Example:
DynamoDB item:
uid: cae7t surname: Adams given_name: Alice email: [email protected]
Resulting Infinispan entry:
uid=cae7t
,
givenName=Alice
, surname=Adams
and
[email protected]
.
item
- The DynamoDB item. Must not be null
.Copyright © 2018 Connect2id Ltd.. All rights reserved.