T
- generic class type to use with this Partitionerpublic class Partitioner<T> extends Object
Modifier and Type | Field and Description |
---|---|
static PartitionSize |
daySize
PartitionSize based on Day intervals
|
static PartitionSize |
hourSize
PartitionSize based on Hour intervals
|
static PartitionSize |
monthSize
PartitionSize based on Month intervals
|
static PartitionSize |
twoMonthSize
PartitionSize based on Two Month intervals
|
static PartitionSize |
twoYearSize
PartitionSize based on Two Year intervals
|
static PartitionSize |
weekSize
PartitionSize based on Week intervals
|
static PartitionSize |
yearSize
PartitionSize based on Year intervals
|
Constructor and Description |
---|
Partitioner(ElementPartitionMap<T> map) |
Modifier and Type | Method and Description |
---|---|
void |
dumpPartitions(List<Partition<T>> partitions)
Debugging method
|
List<Partition<T>> |
getRange(PartitionSize size,
Date start,
Date end)
Create a List of Partition objects of the specified size, which span the
date range specified.
|
PartitionSize |
getSize(Date first,
Date last,
int maxP)
Attempt to find the smallest PartitionSize implementation which, spanning
the range first and last specified, produces at most maxP partitions.
|
static PartitionSize |
getSize(String name)
Get a PartitionSize object by it's name
|
void |
populate(List<Partition<T>> partitions,
Iterator<T> itr)
Add elements from itr into the appropriate partitions.
|
public static PartitionSize hourSize
public static PartitionSize daySize
public static PartitionSize weekSize
public static PartitionSize monthSize
public static PartitionSize twoMonthSize
public static PartitionSize yearSize
public static PartitionSize twoYearSize
public Partitioner(ElementPartitionMap<T> map)
map
- that converts from the Generic type used in this instance
to a Date, and adds a Generic type used to a Partitionpublic static PartitionSize getSize(String name)
name
- of the PartitionSizepublic PartitionSize getSize(Date first, Date last, int maxP)
first
- Date of beginning of time rangelast
- Date of end of time rangemaxP
- maximum number of Partitions to usepublic List<Partition<T>> getRange(PartitionSize size, Date start, Date end)
size
- of Partitions to createstart
- Date of beginning of time range to coverend
- Date of end of time range to coverpublic void populate(List<Partition<T>> partitions, Iterator<T> itr)
partitions
- to populate with objectsitr
- ascending Iterator of objects to place into the partitionsCopyright © 2005–2015 IIPC. All rights reserved.