Package io.unlaunch.store
Class RefreshableDataStoreProvider
java.lang.Object
io.unlaunch.store.RefreshableDataStoreProvider
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public final class RefreshableDataStoreProvider
extends java.lang.Object
implements java.io.Closeable
Provides a singleton instance of the
UnlaunchHttpDataStore
such that it updates itself periodically.- Author:
- umermansoor
-
Constructor Summary
Constructors Constructor Description RefreshableDataStoreProvider(UnlaunchRestWrapper restWrapper, java.util.concurrent.CountDownLatch initialDownloadDoneLatch, java.util.concurrent.atomic.AtomicBoolean downloadSuccessful, long dataStoreRefreshDelayInSeconds)
-
Method Summary
Modifier and Type Method Description void
close()
UnlaunchDataStore
getDataStore()
UnlaunchDataStore
getNoOpDataStore()
-
Constructor Details
-
RefreshableDataStoreProvider
public RefreshableDataStoreProvider(UnlaunchRestWrapper restWrapper, java.util.concurrent.CountDownLatch initialDownloadDoneLatch, java.util.concurrent.atomic.AtomicBoolean downloadSuccessful, long dataStoreRefreshDelayInSeconds)
-
-
Method Details
-
getNoOpDataStore
-
getDataStore
-
close
public void close()- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-