public class InitializationContext extends Object
EventProcessorClientBuilder.processPartitionInitialization(Consumer)
before the EventProcessorClient
instance begins processing events from a partition.Constructor and Description |
---|
InitializationContext(PartitionContext partitionContext,
EventPosition initialPosition)
Creates an instance of InitializationContext for the partition provided in the
PartitionContext . |
Modifier and Type | Method and Description |
---|---|
EventPosition |
getInitialPosition()
Returns the default initial event position from which the processing will start in the absence of a checkpoint in
CheckpointStore . |
PartitionContext |
getPartitionContext()
Returns the partition information for which the event processing is going to start.
|
void |
setInitialPosition(EventPosition initialPosition)
If a different initial position is desirable for this partition, setting the initial position will start the
event processing from this position.
|
public InitializationContext(PartitionContext partitionContext, EventPosition initialPosition)
PartitionContext
.partitionContext
- The partition information for which the event processing is going to start.initialPosition
- The default initial event position from which the processing will start in the absence of
a checkpoint in CheckpointStore
.NullPointerException
- if partitionContext
or initialPosition
is null
.public PartitionContext getPartitionContext()
public EventPosition getInitialPosition()
CheckpointStore
.CheckpointStore
.public void setInitialPosition(EventPosition initialPosition)
CheckpointStore
is given the highest
priority and if there's a checkpoint in the store, that will be used regardless of what is set in this method.initialPosition
- The initial event position to start the event processing from.NullPointerException
- if initialPosition
is null
.Copyright © 2019 Microsoft Corporation. All rights reserved.