de.unikassel.android.sdcframework.persistence
Class WaitStrategy
java.lang.Object
de.unikassel.android.sdcframework.util.AbstractChainWorker<PersistentStorageManager>
de.unikassel.android.sdcframework.persistence.AbstractDatabaseFullStrategy
de.unikassel.android.sdcframework.persistence.WaitStrategy
- All Implemented Interfaces:
- DatabaseFullStrategy, ChainWorker<PersistentStorageManager>
public final class WaitStrategy
- extends AbstractDatabaseFullStrategy
Implementation of a the database full strategy which does just wait a bit.
The idea behind this strategy is, that the transmission service may be just a
bit busy but soon samples will be removed for transmission.
This strategy should just be a first choice, e.g. for the case of an absent
transmission possibility, because the queued samples in the storage service
may exceed memory limits soon.
Field Summary |
private long |
sleepTime
The wait time |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sleepTime
private final long sleepTime
- The wait time
WaitStrategy
public WaitStrategy(long waitTime)
- Constructor
- Parameters:
waitTime
- the time to wait in milliseconds
getSleepTime
public final long getSleepTime()
- Getter for the wait time
- Returns:
- the wait time
process
public final boolean process(PersistentStorageManager storageManager)
- Description copied from class:
AbstractChainWorker
- Processing method of the worker
- Overrides:
process
in class AbstractDatabaseFullStrategy
- Parameters:
storageManager
- the client
- Returns:
- true if successful