public final class IncrementalSimonsPurger extends Object
start(long, java.util.concurrent.TimeUnit)
changes state of the class to started. In this state periodical Simons purging is performed. To stop
purging one need to call cancel()
. This method will change current state of the object
to stopped. All other state transitions except from stopped to started or from started to stopped are forbidden.
This class is thread safe.
Here is a code example of how to configure IncrementalSimonsPurger
to clean all outdated incremental
Simons once a day for default manager:
Manager manager = SimonManager.manager();
IncrementalSimonsPurger incrementalSimonsPurger = new IncrementalSimonsPurger(manager);
incrementalSimonsPurger.start(1, TimeUnit.DAYS);
Constructor and Description |
---|
IncrementalSimonsPurger(Manager manager)
Create Simons purger for the specified Manager.
|
public IncrementalSimonsPurger(Manager manager)
manager
- manager for which old incremental Simons will be purgedCopyright © 2019. All rights reserved.