Package nxt.blockchain
Class DroppedTransactionStore
java.lang.Object
nxt.blockchain.DroppedTransactionStore
The `DroppedTransactionStore` class handles a collection of
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.
-
Method Summary
-
Method Details
-
cleanup
public void cleanup(int currentTime) Cleanup any entries that expired. If the size is bigger than the maxSize proveded when the store is created, remove the entries that will expire sooner- Parameters:
currentTime- timestamp in same format and resolution as the expiration provided toadd(Long, UtxComparableData, int)
-
getSize
public int getSize()
-