public class IPDataPartitioner extends java.lang.Object implements DataPartitioner
Assumes an 8-bit partition size
| Constructor and Description |
|---|
IPDataPartitioner() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.math.BigInteger> |
arrayToPartitions(java.util.List<?> elementList,
java.lang.String type)
Create 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.
|
public java.util.List<java.math.BigInteger> toPartitions(java.lang.Object object,
java.lang.String type)
DataPartitionerIf the Object does not have/need a specific type identifier, use null.
toPartitions in interface DataPartitionerpublic java.lang.Object fromPartitions(java.util.List<java.math.BigInteger> parts,
int partsIndex,
java.lang.String type)
DataPartitionerIf the Object does not have/need a specific type identifier, use null.
fromPartitions in interface DataPartitionerpublic int getBits(java.lang.String type)
DataPartitionergetBits in interface DataPartitionerpublic java.util.List<java.math.BigInteger> getPaddedPartitions(java.lang.String type)
DataPartitionergetPaddedPartitions in interface DataPartitionerpublic java.util.List<java.math.BigInteger> arrayToPartitions(java.util.List<?> elementList,
java.lang.String type)
arrayToPartitions in interface DataPartitionerpublic int getNumPartitions(java.lang.String type)
DataPartitionergetNumPartitions in interface DataPartitioner