public interface QueueingSegmentListener<K,V,E extends Event<K,V>> extends CacheStream.SegmentCompletionListener
Modifier and Type | Field and Description |
---|---|
static Object |
NOTIFIED |
static Object |
REMOVED |
Modifier and Type | Method and Description |
---|---|
Set<CacheEntry<K,V>> |
findCreatedEntries()
This method is to be called just before marking the transfer as complete and after all keys have been manually
processed.
|
boolean |
handleEvent(E event,
ListenerInvocation<Event<K,V>> invocation)
This should be called by any listener when an event is generated to possibly queue it.
|
Object |
markKeyAsProcessing(K key)
This should be invoked on a key before actually processing the data.
|
void |
notifiedKey(K key)
This should invoked after the key has been successfully processed to tell the handler that the
key is done.
|
void |
transferComplete()
This is needed to tell the handler when the complete iteration is done.
|
segmentCompleted
Object markKeyAsProcessing(K key)
Set<CacheEntry<K,V>> findCreatedEntries()
void notifiedKey(K key)
key
- The key that was processedboolean handleEvent(E event, ListenerInvocation<Event<K,V>> invocation)
event
- The event that was just raisedinvocation
- The invocation the event would be fired onvoid transferComplete()
Copyright © 2023 JBoss, a division of Red Hat. All rights reserved.