public class Partitioner64
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
long |
last
The value addressing the position one past the final
element in the range.
|
int |
size
The size of the partition.
|
| Constructor and Description |
|---|
Partitioner64(long first,
long last)
Constructs a Partitioner64 object from the specified range with
the default partition size equal to 1.
|
Partitioner64(long first,
long last,
int partitionSize)
Constructs a Partitioner64 object from the specified range
using the specified partition size.
|
| Modifier and Type | Method and Description |
|---|---|
long |
GetIndex()
Gets the current index before it is incremented in a
thread safe mode.
|
long |
GetIndex(int taskId)
Gets the current index before it is incremented in a
thread safe mode for the specified task.
|
Tuple2<java.lang.Long,java.lang.Long> |
GetPartition()
Gets the current partition before it is incremented in a
thread safe mode.
|
public final int size
public final long last
public Partitioner64(long first,
long last)
first - An integer addressing the position of the
first element in the range.last - An integer addressing the position one
past the final element in the range.public Partitioner64(long first,
long last,
int partitionSize)
first - An integer addressing the position of the
first element in the range.last - An integer addressing the position one
past the final element in the range.partitionSize - The specified partition size.public long GetIndex()
Remarks: The current index is not incremented anymore if it is equal to last.
public long GetIndex(int taskId)
Remarks: The current index is not incremented anymore if it is equal to last.
taskId - The specified task.public Tuple2<java.lang.Long,java.lang.Long> GetPartition()
Remarks: The current partition is not incremented anymore if it is equal to (last, last).
Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.