public interface DataPartitioner
extends java.io.Serializable
All custom object partitioners must implement this interface
Modifier and Type | Method and Description |
---|---|
java.util.List<java.math.BigInteger> |
arrayToPartitions(java.util.List<?> elementList,
java.lang.String type)
Creates partitions for an array of the same type of elements - used when a data value field is an array and we wish to encode these into the return value.
|
java.lang.Object |
fromPartitions(java.util.List<java.math.BigInteger> parts,
int partsIndex,
java.lang.String type)
Method to reconstruct an Object given a List of its BigInteger partition elements and its type identifier.
|
int |
getBits(java.lang.String type)
Returns the number of bits of an object with the given type.
|
int |
getNumPartitions(java.lang.String type)
Method to get the number of partitions of the data object given the type.
|
java.util.List<java.math.BigInteger> |
getPaddedPartitions(java.lang.String type)
Method to get an empty set of partitions by data type - used for padding return array values.
|
java.util.List<java.math.BigInteger> |
toPartitions(java.lang.Object object,
java.lang.String type)
Method to partition the given Object into a List of BigInteger partition elements given its type identifier.
|
java.util.List<java.math.BigInteger> toPartitions(java.lang.Object object, java.lang.String type) throws PIRException
If the Object does not have/need a specific type identifier, use null.
PIRException
java.lang.Object fromPartitions(java.util.List<java.math.BigInteger> parts, int partsIndex, java.lang.String type) throws PIRException
If the Object does not have/need a specific type identifier, use null.
PIRException
int getBits(java.lang.String type) throws PIRException
PIRException
java.util.List<java.math.BigInteger> arrayToPartitions(java.util.List<?> elementList, java.lang.String type) throws PIRException
PIRException
java.util.List<java.math.BigInteger> getPaddedPartitions(java.lang.String type) throws PIRException
PIRException
int getNumPartitions(java.lang.String type) throws PIRException
PIRException