public class SingleElementPartitionChunk<T> extends Object implements PartitionChunk<T>
Constructor and Description |
---|
SingleElementPartitionChunk(T element) |
Modifier and Type | Method and Description |
---|---|
boolean |
abuts(PartitionChunk<T> tPartitionChunk)
Determines if this PartitionChunk abuts another PartitionChunk.
|
int |
compareTo(PartitionChunk<T> chunk)
The ordering of PartitionChunks is determined entirely by the partition boundaries and has nothing to do
with the object.
|
boolean |
equals(Object o) |
int |
getChunkNumber()
Returns the partition chunk number of this PartitionChunk.
|
T |
getObject()
Returns the payload, generally an object that can be used to perform some action against the shard.
|
int |
hashCode() |
boolean |
isEnd()
Returns true if this chunk is the end of the partition.
|
boolean |
isStart()
Returns true if this chunk is the beginning of the partition.
|
String |
toString() |
public SingleElementPartitionChunk(T element)
public T getObject()
PartitionChunk
getObject
in interface PartitionChunk<T>
public boolean abuts(PartitionChunk<T> tPartitionChunk)
PartitionChunk
abuts
in interface PartitionChunk<T>
tPartitionChunk
- input chunkpublic boolean isStart()
PartitionChunk
isStart
in interface PartitionChunk<T>
public boolean isEnd()
PartitionChunk
isEnd
in interface PartitionChunk<T>
public int getChunkNumber()
PartitionChunk
getChunkNumber
in interface PartitionChunk<T>
public int compareTo(PartitionChunk<T> chunk)
compareTo
in interface Comparable<PartitionChunk<T>>
chunk
- Copyright © 2011–2017. All rights reserved.