Class PersistentHitQueue
-
- All Implemented Interfaces:
public class PersistentHitQueue extends HitQueuing
Provides functionality for asynchronous processing of hits in a synchronous manner while providing the ability to retry hits.
-
-
Constructor Summary
Constructors Constructor Description PersistentHitQueue(DataQueue queue, HitProcessing processor)Constructor to create HitQueuing with underlying DataQueue
-
Method Summary
Modifier and Type Method Description booleanqueue(DataEntity entity)Queues a DataEntity to be processed voidbeginProcessing()Puts the Queue in non-suspended state and begin processing hits voidsuspend()Puts the Queue in suspended state and discontinue processing hits voidclear()Removes all the persisted hits from the queue intcount()Returns the number of items in the queue voidclose()Close the current HitQueuing-
-
Constructor Detail
-
PersistentHitQueue
PersistentHitQueue(DataQueue queue, HitProcessing processor)
Constructor to create HitQueuing with underlying DataQueue- Parameters:
queue- object ofDataQueuefor persisting hitsprocessor- object of HitProcessing for processing hits
-
-
Method Detail
-
queue
boolean queue(DataEntity entity)
Queues a DataEntity to be processed
- Parameters:
entity- the entity to be processed- Returns:
a boolean indication whether queuing the entity was successful or not
-
beginProcessing
void beginProcessing()
Puts the Queue in non-suspended state and begin processing hits
-
suspend
void suspend()
Puts the Queue in suspended state and discontinue processing hits
-
clear
void clear()
Removes all the persisted hits from the queue
-
count
int count()
Returns the number of items in the queue
-
close
void close()
Close the current
HitQueuing
-
-
-
-