Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.service.cleanup;
 
 
 
 public abstract class CleanupTask<T>
 {
    protected final TimeMaster _timeMaster;
    
    protected final AtomicBoolean _shutdown;
    protected long _startupTime;
    
    protected CleanupTask(SharedServiceStuff stuff,
            AtomicBoolean shutdown)
    {
         = stuff.getTimeMaster();
         = shutdown;
    }
    protected boolean shouldStop()
    {
        return .get();
    }
    protected T cleanUp() throws Exception
    {
        return _cleanUp();
    }
    protected abstract T _cleanUp() throws Exception;
    @Override
    public String toString() {
        return getClass().getName();
    }
New to GrepCode? Check out our FAQ X