|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unikassel.android.sdcframework.util.AbstractChainWorker<PersistentStorageManager>
de.unikassel.android.sdcframework.persistence.AbstractDatabaseFullStrategy
de.unikassel.android.sdcframework.persistence.DeleteSamplesStrategy
public final class DeleteSamplesStrategy
Implementation of a the database full strategy which does delete old samples.
This strategy does delete the configured count of samples in the database.
Normally the oldest samples will be selected first, but if
configured, the oldest samples with lowest priority will be preferred for deletion.
Field Summary | |
---|---|
protected int |
countToDelete
The count of samples to delete |
protected boolean |
lowestPriorityFirst
The count of samples to delete |
Constructor Summary | |
---|---|
DeleteSamplesStrategy(int countToDelete,
boolean lowestPriorityFirst)
Constructor |
Method Summary | |
---|---|
int |
getCountToDelete()
Getter for the record count to delete |
Object |
isDeletingPriorityBased()
Getter for the priority basted deletion flag |
boolean |
process(PersistentStorageManager storageManager)
Processing method of the worker |
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractChainWorker |
---|
doWork, getSuccessor, setSuccessor, withSuccessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ChainWorker |
---|
doWork, getSuccessor, setSuccessor, withSuccessor |
Field Detail |
---|
protected final int countToDelete
protected final boolean lowestPriorityFirst
Constructor Detail |
---|
public DeleteSamplesStrategy(int countToDelete, boolean lowestPriorityFirst)
countToDelete
- the count of samples to deletelowestPriorityFirst
- if true the oldest samples with lowest priority will be deleted
firstMethod Detail |
---|
public final int getCountToDelete()
public final boolean process(PersistentStorageManager storageManager)
AbstractChainWorker
process
in class AbstractDatabaseFullStrategy
storageManager
- the client
public Object isDeletingPriorityBased()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |