You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to use FileQueue as an emergency storage, if the database connection is not available.
Therefor it would be great if it is possible to reserve a fix number of blocks initially on the disk when creating the storage file.
This parameter (number of blocks) should be part of the builder.
Thanks
Rainer
The text was updated successfully, but these errors were encountered:
Are you referring to .maxQueueSize()? If so, it is already implemented. Please take a look at the queueItem method outlined below. When calling queueItem, it will block for specified time frame or until a slot becomes available in the queue. As soon as slot becomes available, FileQueue will call availableSlot. Use your availableSlot method to write your storage file to disk. Then when queue consume() is called by FileQueue, use the ID stored in your FileQueueItem to load the cached storage file from disk, perform processing, then delete the cached file.
public void queueItem(T fileQueueItem,
QueueCallback queueCallback,
int acquireWait,
TimeUnit acquireWaitUnit)
throws Exception
Queue item for delivery. Wait for an open slot for a specified time period. Calls availableSlot when slot becomes available, immediately before queuing
interface QueueCallback
void availableSlot(T fileQueueItem)
throws Exception
Called when a slot is available in the queue for processing.
We would like to use FileQueue as an emergency storage, if the database connection is not available.
Therefor it would be great if it is possible to reserve a fix number of blocks initially on the disk when creating the storage file.
This parameter (number of blocks) should be part of the builder.
Thanks
Rainer
The text was updated successfully, but these errors were encountered: