Top Description Fields Constructors Methods
javax.batch.api.partition

public Class PartitionPlanImpl

extends Object
implements PartitionPlan
Class Inheritance
All Implemented Interfaces
javax.batch.api.partition.PartitionPlan
Imports
java.util.Properties

The PartitionPlanImpl class provides a basic implementation of the PartitionPlan interface.

Field Summary

Modifier and TypeField and Description
private boolean
pack-priv Properties[]
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Properties[]
getPartitionProperties()

Implements javax.batch.api.partition.PartitionPlan.getPartitionProperties.

Gets array of Partition Properties objects for Partitions.
public int
public boolean
getPartitionsOverride()

Implements javax.batch.api.partition.PartitionPlan.getPartitionsOverride.

Return current value of partition override setting.
public int
getThreads()

Implements javax.batch.api.partition.PartitionPlan.getThreads.

Gets maximum number of threads requested to use to run partitions for this step.
public void
setPartitionProperties(Properties[]
specifies the Properties object array
props
)

Implements javax.batch.api.partition.PartitionPlan.setPartitionProperties.

Sets array of substitution Properties objects for the set of Partitions.
public void
setPartitions(int
specifies the partition count
count
)

Implements javax.batch.api.partition.PartitionPlan.setPartitions.

Set number of partitions.
public void
setPartitionsOverride(boolean
See method description
override
)

Implements javax.batch.api.partition.PartitionPlan.setPartitionsOverride.

Specify whether or not to override the partition count from the previous job execution.
public void
setThreads(int
specifies the requested thread count
count
)

Implements javax.batch.api.partition.PartitionPlan.setThreads.

Set maximum number of threads requested to use to run partitions for this step.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

overrideback to summary
private boolean override
partitionPropertiesback to summary
pack-priv Properties[] partitionProperties
partitionsback to summary
private int partitions
threadsback to summary
private int threads

Constructor Detail

PartitionPlanImplback to summary
public PartitionPlanImpl()

Method Detail

getPartitionPropertiesback to summary
public Properties[] getPartitionProperties()

Implements javax.batch.api.partition.PartitionPlan.getPartitionProperties.

Doc from javax.batch.api.partition.PartitionPlan.getPartitionProperties.

Gets array of Partition Properties objects for Partitions.

These can be used in Job XML substitution using substitution expressions with the syntax: #{partitionPlan['propertyName']}

Each element of the Properties array returned can be used to resolving substitutions for a single partition. In the typical use case, each Properties element will have a similar set of property names, with a substitution potentially resolving to the corresponding value for each partition.

Returns:Properties[]

Partition Properties object array

Annotations
@Override
getPartitionsback to summary
public int getPartitions()

Implements javax.batch.api.partition.PartitionPlan.getPartitions.

Doc from javax.batch.api.partition.PartitionPlan.getPartitions.

Gets count of Partitions.

Returns:int

Partition count

Annotations
@Override
getPartitionsOverrideback to summary
public boolean getPartitionsOverride()

Implements javax.batch.api.partition.PartitionPlan.getPartitionsOverride.

Doc from javax.batch.api.partition.PartitionPlan.getPartitionsOverride.

Return current value of partition override setting.

Returns:boolean

override setting.

Annotations
@Override
getThreadsback to summary
public int getThreads()

Implements javax.batch.api.partition.PartitionPlan.getThreads.

Doc from javax.batch.api.partition.PartitionPlan.getThreads.

Gets maximum number of threads requested to use to run partitions for this step. A value of '0' requests the batch implementation to use the partition count as the thread count. Note the batch runtime is not required to use this full number of threads; it may not have this many available, and may use less.

Returns:int

requested thread count

Annotations
@Override
setPartitionPropertiesback to summary
public void setPartitionProperties(Properties[] props)

Implements javax.batch.api.partition.PartitionPlan.setPartitionProperties.

Doc from javax.batch.api.partition.PartitionPlan.setPartitionProperties.

Sets array of substitution Properties objects for the set of Partitions.

Parameters
props:Properties[]

specifies the Properties object array

Annotations
@Override
setPartitionsback to summary
public void setPartitions(int count)

Implements javax.batch.api.partition.PartitionPlan.setPartitions.

Doc from javax.batch.api.partition.PartitionPlan.setPartitions.

Set number of partitions.

Parameters
count:int

specifies the partition count

Annotations
@Override
setPartitionsOverrideback to summary
public void setPartitionsOverride(boolean override)

Implements javax.batch.api.partition.PartitionPlan.setPartitionsOverride.

Doc from javax.batch.api.partition.PartitionPlan.setPartitionsOverride.

Specify whether or not to override the partition count from the previous job execution. This applies only to step restart.

When false is specified, the partition count from the previous job execution is used and any new value set for partition count in the current run is ignored. In addition, partition results from the previous job execution are remembered, and only incomplete partitions are reprocessed.

When true is specified, the partition count from the current run is used and all results from past partitions are discarded. Any resource cleanup or back out of work done in the previous run is the responsibility of the application. The PartitionReducer artifact's rollbackPartitionedStep method is invoked during restart before any partitions begin processing to provide a cleanup hook.

Parameters
override:boolean

See method description

Annotations
@Override
setThreadsback to summary
public void setThreads(int count)

Implements javax.batch.api.partition.PartitionPlan.setThreads.

Doc from javax.batch.api.partition.PartitionPlan.setThreads.

Set maximum number of threads requested to use to run partitions for this step. A value of '0' requests the batch implementation to use the partition count as the thread count. Note the batch runtime is not required to use this full number of threads; it may not have this many available, and may use less.

Parameters
count:int

specifies the requested thread count

Annotations
@Override