Package org.knowm.xchange.utils.nonce
Class CurrentTimeIncrementalNonceFactory
java.lang.Object
org.knowm.xchange.utils.nonce.CurrentTimeIncrementalNonceFactory
- All Implemented Interfaces:
si.mazi.rescu.SynchronizedValueFactory<Long>
public class CurrentTimeIncrementalNonceFactory
extends Object
implements si.mazi.rescu.SynchronizedValueFactory<Long>
Class computes a current time based nonce.
This class while designed to be thread-safe does not protect against multiple processes where
the system clock may be out of sync. It also does not protect a system where a lower granularity
time unit like TimeUnit.SECONDS
is used and the same nonce is computed at the same time
from competing processes.
Compatibility is limited to the time units specified.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CurrentTimeIncrementalNonceFactory
-
-
Method Details
-
createValue
- Specified by:
createValue
in interfacesi.mazi.rescu.SynchronizedValueFactory<Long>
-