com.nimbusds.infinispan.persistence.dynamodb.PrimaryKeyValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-cachestore-dynamodb Show documentation
Show all versions of infinispan-cachestore-dynamodb Show documentation
Infinispan module for persisting data to an AWS DynamoDB table
package com.nimbusds.infinispan.persistence.dynamodb;
/**
* DynamoDB primary key value (hash key, with optional range key).
*/
public final class PrimaryKeyValue {
/**
* The hash key value.
*/
private final String hashKeyValue;
/**
* The optional range key value.
*/
private final String rangeKeyValue;
/**
* Creates a new DynamoDB primary key value.
*
* @param hashKeyValue The hash key value. Must not be {@code null}.
* @param rangeKeyValue The optional range key value, {@code null} if
* none.
*/
public PrimaryKeyValue(final String hashKeyValue, final String rangeKeyValue) {
if (hashKeyValue == null) {
throw new IllegalArgumentException("The hash key value must not be null");
}
this.hashKeyValue = hashKeyValue;
this.rangeKeyValue = rangeKeyValue;
}
/**
* Returns the hash key value.
*
* @return The hash key value.
*/
public String getHashKeyValue() {
return hashKeyValue;
}
/**
* Returns the range key value.
*
* @return The range key value, {@code null} if none.
*/
public String getRangeKeyValue() {
return rangeKeyValue;
}
}