public interface StreamerIndexProvider<E,K,V> extends StreamerIndexProviderMBean
StreamerWindow
to perform event indexing.
To configure index for a streamer window, use
StreamerWindowAdapter.setIndexes(StreamerIndexProvider[])
.
Modifier and Type | Method and Description |
---|---|
void |
add(StreamerIndexUpdateSync sync,
E evt)
Adds an event to index.
|
void |
dispose()
Disposes the index.
|
void |
endUpdate(StreamerIndexUpdateSync sync,
E evt,
boolean rollback,
boolean rmv)
Finalizes an update operation.
|
String |
getName()
Gets index name.
|
StreamerIndexPolicy |
getPolicy()
Gets event indexing policy, which defines how events
are tracked within an index.
|
StreamerIndex<E,K,V> |
index()
Gets user view for this index.
|
void |
initialize()
Initializes the index.
|
boolean |
isUnique()
Checks whether this index is unique or not.
|
void |
remove(StreamerIndexUpdateSync sync,
E evt)
Removes an event from index.
|
void |
reset()
Resets the index to an initial empty state.
|
name, policy, size, sorted, unique, updaterClass
String getName()
StreamerIndex<E,K,V> index()
void initialize()
void reset()
void dispose()
void add(StreamerIndexUpdateSync sync, E evt) throws IgniteException
sync
- Index update synchronizer.evt
- Event to add to an index.IgniteException
- If failed to add event to an index.void remove(StreamerIndexUpdateSync sync, E evt) throws IgniteException
sync
- Index update synchronizer.evt
- Event to remove from index.IgniteException
- If failed to add event to an index.StreamerIndexPolicy getPolicy()
boolean isUnique()
Object.equals(Object)
returns true
), an exception
is thrown.True
for unique index.void endUpdate(StreamerIndexUpdateSync sync, E evt, boolean rollback, boolean rmv)
sync
- Index update synchronizer.evt
- Updated event.rollback
- Rollback flag. If true
, a rollback was made.rmv
- Remove flag. If true
, the event was removed from index.
Follow @ApacheIgnite
Apache Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 16 2015