public class DroppedTransactionStore
extends java.lang.Object
comparable data
for transactions that have been dropped. It offers functionality to add,
retrieve, and clean up entries once the transactions have expired.
This class uses a concurrent map to store known dropped transactions' data and a priority queue to manage its expiration. The priority queue ensures that expired data is cleaned up
The store has a maximum size limit, and if the number of transactions exceeds this limit, the oldest transactions (those closest to expiration) are removed during cleanup.
Modifier and Type | Method and Description |
---|---|
void |
cleanup(int currentTime)
Cleanup any entries that expired.
|
int |
getSize() |
public void cleanup(int currentTime)
currentTime
- timestamp in same format and resolution as the
expiration provided to add(Long, UtxComparableData, int)
public int getSize()