Monitoring the Size of Write-Behind Queue
Use the method net.sf.ehcache.statistics.LiveCacheStatistics#getWriterQueueLength() to get the length of the queue. This method returns the number of elements on the local queue (in all local buckets) that are waiting to be processed, or -1 if no write-behind queue exists.
Note that elements or a batch currently being processed (and coalesced elements) are not included in the returned value.