* Add cacheOnly option to StoreReadRequest
Signed-off-by: William Brawner <me@wbrawner.com>
* Fix doc on StoreReadRequest.cacheOnly
Signed-off-by: William Brawner <me@wbrawner.com>
* Hit disk caches for cacheOnly requests
Signed-off-by: William Brawner <me@wbrawner.com>
* Rename cacheOnly to localOnly
Signed-off-by: William Brawner <william.p.brawner@aexp.com>
* Send NoNewData and log warning for localOnly requests with no local data sources configured
Signed-off-by: William Brawner <william.p.brawner@aexp.com>
---------
Signed-off-by: William Brawner <me@wbrawner.com>
Signed-off-by: William Brawner <william.p.brawner@aexp.com>
* split read and write SOT types
* all but 2 tests passing
* remove extranous parameterized type on simple store factory
* pr review
* pr review
* Passing except for UpdaterTests (#565)
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* mark mutablestore experimental
---------
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
Co-authored-by: Matt Ramotar <mramotar@dropbox.com>
* Make it possible to provide memory cache
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Format
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Add HybridCache
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Fix putList
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Enable memory cache delegation with Guava as default
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Add MutableStoreWithHybridCacheTests
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Support all cache methods
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Rename to multicache
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Refactor from list decomposition to collection decomposition
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Remove ReactiveCircus/android-emulator-runner
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Remove MemoryCache
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Update .ci_test_and_publish.yml
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Update .ci_test_and_publish.yml
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Update .ci_test_and_publish.yml
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Update .ci_test_and_publish.yml
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Format
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Prepare for release 5.0.0-beta01
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
---------
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Separate MutableStoreBuilder from StoreBuilder
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Enable conversion from StoreBuilder to MutableStoreBuilder
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Clean up
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* Fix tests
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
---------
Signed-off-by: Matt Ramotar <mramotar@dropbox.com>
* [Temp] Remove all modules
* Remove references to Store 4
* Update CHANGELOG
* Update README
* Add Store 5 foundation
Co-authored-by: Andre Claßen <aclassen@users.noreply.github.com>
Co-authored-by: Mike Nakhimovich <mnakhimovich@Mikes-MBP.localdomain>
* Latest is 0.8.0, but 0.4.0 works. Starts to break at 0.5.0.
* Kotlin Atomic Plugin working with 0.14.4
* Atomic Kotlin Plugin working with 0.15.0
* Atomic Kotlin Plugin working with 0.15.1
* Upgrade Gradle Wrapper to 7.4.1
* AGP 4.1.0 -> 4.2.0
* AGP 4.2.0 -> 7.0.2
* AGP 7.0.2 -> 7.1.2
* Kotlin 1.6.10 and Spotless Plugin 6.3.0 Upgrade
* WARNING:The specified Android SDK Build Tools version (29.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.1.2.
* Using --rerun-tasks instead of clean.
* KT Lint formatting update.
Co-authored-by: Sam Edwards <samedwards@dropbox.com>
This should still maintain compatiblity with Kotlin 1.4 and 1.5 whilst also ensuring forward compatiblilty with Kotlin 1.6.
Compatibility with 1.4-M3 should be safe to drop.
* Revert "Remove unnecessary FlowPreview & ExperimentalCoroutinesApi annotations. These are not needed with newer versions of Kotlin. (#289)"
This reverts commit 61b8cb0633.
* Fix missing experimental annotations
* update coroutines to 1.4.0, kotlin to 1.4.0
This CL updates coroutines to 1.4.0, kotlin to 1.4.10 and
also removes the only usage of ConflatedBroadcastChannel
(in SOTWithBarrier) with MutableStateFlow.
* expand SOTWithBarrier failure test
This change improves the failure test case to ensure it continues
for future writes
* Revert to using guava port cache by depending on jar
* Apply suggestions from code review
* revert code to old cache
* clean up build.gradle
* manually remove cache4 entries that are regenerated locally because of some dirty cache?
* bump gradle
* rerun tasks
* try to deflake rx tests
* cache builder tests
* api dump
* bump ktlint to work with 1.4 features
* formatting
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
It currently breaks consumers compiling with Kotlin
1.4-M3 (not sure why).
Added some TODOs to revert back to using Duration.INFINITE
once Store is compiled with Kotlin 1.4
Closes#188
* reproduce #177 and fix reader errors
* dispatch write errors to receiver
Now source of truth can unblock reader while also letting them
know that an error happened while writing. This forces readers
to first dispatch the error then whatever data they have.
I've also added new public WriteException/ReadException classes
to SourceOfTruth so that it is easy to diagnose these problems
when it hits to the developer's code
* Move Fetcher factories into companion
Fetcher factories were global methods, which made them hard
to discover since IDE cannot easily auto-complete.
This PR moves them into the companion of Fetcher while also
making Fetcher a real interface instead of a typealias.
Even though it is a bit more code for the developer, now they
can easily discover how to create a Fetcher by typing Fetcher.
Fixes: #167
* make rx methods start w/ from too for consistency
* Rename fether factories to be more clear, hopefully :/
* remove fetch method, use invoke instead
* Make Fetcher.from the one that receives a suspend fun.
Create Fetcher.fromFlow for the flowing version.
Rename both SourceOfTruth builder methods to . Rely on param names to disambiguate
* use .of instead, this seems better to me.
We should probably get rid of StoreBuilder.from and make it
Store.builder()
* fix jvm name for SourceOfTruth.of with flow function
* fix RxSourceOfTruth name to match original class
* specify bounds for FactoryFetcher
* updates per PR review
* update graph per SoT rename
* update rxjava3 APIs as well
These appeared after i rebased, missed them completely.
Also fixed some tests, appearantly IJ parameter name refactor does
not always work
* supress wrong unnecessary cast warning
without this, multicaster cannot resolve to the base StoreResponse type
* upgade gradle, try to fix build by disabling caching
* split subscribers
* resubscribe
Co-authored-by: miken <miken@dropbox.com>
Co-authored-by: miken <miken@dropbox.com>
* Support non exception errors from fetcher
* revert parital changes to store builder to reduce noise
* finish off diff
* Allow to create a FetcherResult.Error without a Throwable. Add tests
* Add missing funcion and more tests
* lint
* unflake RxFlowableStoreTest
* try to rename FakeFetcher to FakeRxFetcher to (maybe) solve missing codcov
* move SourceOfTruth out of impl package
* Rename accidental change of RxStoreBuilder.fromMaybe back to formSingle
* Introduce Fetcher from #139
* fix Rx artifact
* delete legacy presistor factory
* fix api file
* move fetcher to be a typealias
* code review comments + clean up documentation
* code review comments
* Update store/src/main/java/com/dropbox/android/external/store4/Fetcher.kt
Co-Authored-By: Yigit Boyar <yboyar@google.com>
* Revert "Update sample app's build.gradle to refer to the externally released version of Store (#159)"
This reverts commit fc8da86f63.
* update releasing.md
Co-authored-by: Yigit Boyar <yboyar@google.com>
* Contain @ExperimentalStdlibApi within relevant scope.
The alpha04 release of Store caused the requirement of the @ExperimentalStdlibApi annotation for client code. I looked into it, and the only thing in Store that required the annotation was the Kotlin ArrayDeque used in the BufferImpl class. That class is private in the ChannelManager.kt file, so I opted that file into the annotation and removed all other occurences of the annotation.
Code compiles, all 208 tests pass.
* update to correct git glitch in /build.gradle
* update to address 'needless blank line' linter
* Prepare for release 4.0.0-alpha05
* Prepare for next development version.
Co-authored-by: Dave Parker <davidp@dropbox.com>
* Migrate cache library to use kotlin.time APIs
* Fix docs and inline durations in tests
* Migrate cache library to use kotlin.time APIs
* Only require ExperimentalTime when setting cache expiration
* Set ExperimentalTime on RealStore to use it on MemoryPolicy
* Set ExperimentalTime on Cache interface and not on functions
* Avoid ExperimentalTime annotation in filesystem module
* Remove unneeded ExpirationTime annotation
* Remove unneeded ExpirationTime annotation