Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service.cleanup;

Helper class used to keep track of clean up progress for local BDB cleanup.
 
 public class LocalCleanupStats
 {
     // Number tombstones expired
    protected int expiredTombstones = 0;
    // Number of local BDB entries removed due to exceeding max TTL
    protected int expiredEntriesMaxTTL = 0;
    // Number of local BDB entries removed due to exceeding TTL since last access
    protected int expiredEntriesLastAccess = 0;
    // Number of skipped (non-expired) tombstones
    protected int remainingTombstones = 0;
    // Number of skipped (non-expired) non-tombstone entries
    protected int remainingEntries = 0;
    // And then "something other"; should not get any hits...
    protected int unknownEntries = 0;
    public void addExpiredTombstone() { ++; }
    public void addExpiredMaxTTLEntry() { ++; }
    public void addExpiredLastAccessEntry() { ++; }
    public void addRemainingTombstone() { ++; }
    public void addRemainingEntry() { ++; }
    public void addUnknownEntry() { ++; }
    @Override
    public String toString()
    {
        return new StringBuilder(60)
            .append("Removed: ").append()
            .append(" expired tombstones, ").append()
            .append(" (max-TTL) / ").append()
            .append(" (last-access) entries; left: ").append()
            .append(" tombstones, ").append()
            .append(" entries and skipped ").append().append(" unknown entries")
            .toString();
    }
New to GrepCode? Check out our FAQ X