K
- the key type of its partitions.public final class SerializedPartition<K> extends Object implements Partition<byte[],K>
Block
s.Constructor and Description |
---|
SerializedPartition(K key,
long elementsTotal,
byte[] serializedData,
int length)
Creates a serialized
Partition having a specific key value. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getData() |
long |
getElementsTotal() |
K |
getKey() |
int |
getLength() |
boolean |
isSerialized() |
public SerializedPartition(K key, long elementsTotal, byte[] serializedData, int length)
Partition
having a specific key value.key
- the key.elementsTotal
- the total number of elements.serializedData
- the serialized data.length
- the length of the actual serialized data. (It can be different with serializedData.length)public K getKey()
public boolean isSerialized()
isSerialized
in interface Partition<byte[],K>
Partition
is serialized or not.public byte[] getData()
public int getLength()
public long getElementsTotal()
Copyright © 2018. All rights reserved.