* [WIP] Add code coverage
* Get multi-module and merging working
* Add CodeCov
* Update location of report.xml
* Check instead of build depends on Jacoco
* Do not merge coverage
* Ignore tests
* update comment
* Fix typos.
* Gradle 6.1, AGP 4.0.0-alpha09, lifecycle 2.2.0.
* Add experimental invalidateAll() support and @ExperimentalStoreAPI annotation.
* Update sample with deleteAll function.
* Update README.md with deleteAll function.
* Add a section to README.md on clearing store entries.
* Rewrite tests without mocking. Move test utils / helpers to a single package.
* Code formatting and cleanups.
* Use StoreResponse.Data instead of DataWithOrigin in ClearAllStoreTest and ClearStoreByKeyTest.
* Simplified samples. Refactor tests.
* Gradle 6.1.1.
* Prepare for release 4.0.0-alpha01
* Prepare next development version
* Update build.gradle
Co-Authored-By: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* Add kotlin plugin to cache module
* Remove custom accessors in StoreDefaults as default values are effectively constant.
* Update JUnit to 4.13 RC2 to enable asserting specific error message on expected exception.
* Remove custom accessors in MemoryPolicy as all values are calculated from constants.
* Remove checkstyle and pmd as the codebase will be 100% Kotlin.
* Fix IDE warning in build.gradle by removing static imports.
* Remove unused guava dependencies.
* Improve StoreDefaults docs.
* Update dependencies and clean up unused ones.
* Update okio to 2.4.1 and migrate deprecated APIs to extension functions.
* Update platform and build-tools in travis config.
* add dokka for store module
move key parser to tests
* remove parser exception
* move RealStore and SourceOfTruth to internal
* move cache type to internal
* move Clearable to tests
* move fetcher to tests
* move multiplexer to internal
* move map indexed to internal
* random cleanup.
Fixed a bunch of warnings.
Moved SimplePersisterAsFlowable into tests as it is not used anymore but
FlowTest uses it.
Moved MemoryPolicyBuilder test to kotlin to make DEFAULT_POLICY a const
* massive file migration
Rename pipeline tests into impl tests
This PR fixes a bug in StoreRealActor where we could call onClose
while actor is processing some messages. Now instead we send a token
to close and inside the message handler we close the channel so that
no new messages can arrive after close meanwhile messages that arrived
before that close is handled properly.
Also set version to 4.0.0 and cleaned up some code.
Fixes#55
* WIP publish test
* add actor based implementation, seems the most promising
* add notes into channel manager as well
* use unlimited channel on the receiver to avoid launching to send
* carry over remaining subscribers into a new flow
* dispatch errors from upstream to all downstreams
* carry over all leftovers at once to avoid starting producer before all is added to the list
* handle swapping channel managers in the consumer
This CL fixes an issue where we wouldn't unsubscribe from the right channel if
the downstream is moved between channel managers due to not receiving any event
after registering.
I've also cleaned up dispatchError to close the channel with error instead of
passing it down as if it is value and throwing again
* allow live buffering
this adds a live buffering functionality to actor publish where
it only buffers if the upstream is still running
* remove logging
* move into src
* code cleanup, more comments
* first shot at new internal store, tests pass, code ugly
* tmp builder for real internal store, starting pipeline tests
* more wip in fixing pipeline store tests, a lot to cleanup
* all tests pass
* code cleanup
* move multiplexer inside store4
* lots of cleanup of unnecessary code
* release barriers that are not used
* don't use pipeline persister.
also fixed a barrier cleanup code in source of truth with barrier
* revert simple persister as flowable change
cleanup for clearstorememorytest
* close multiplexers in fetcher controller when not used
* code style fixes
* Introduce StoreResponse
This CL changes Pipeline API to dispatch StoreResponse instead of Output.
It will allow us to add more metadata into it and also handle things like
source attribution and/or loading state.
This CL only makes the tests pass, does not do anything for actually dispatching
loading state
* first shot at adding a loading state
This CL adds proper StoreResponse to the built in pipelines such
that they can merge information between network and disk.
It needs some cleanup and PipelinePersister's merging logic is
fairly complicated but i couldn't yet find a simpler way to achieve it
* Add more tests to pipeline
Also fixed a bug in cached where it would emit cached value as
Loading even if no refresh is requested
* fix room sample after rebase
* Update the room sample to support refresh
Also some code cleanup in PipelinePersister
* code cleanup
* explain network + disk flow
* Change StoreResponse for plan D
This CL changes store response to act like plan D described here:
https://paper.dropbox.com/doc/Streaming-Data-How-To--AkwrNu0A7\~BikNOP2m20\~R2_AQ-oLBV39GrNimqGDe1vNQMb
Now StoreResponse has 3 types: Data, Error, Loading and each of these have an field.
Loading and Error does not carry over last data anymore, instead, it is expected downstream
to merge them for UI, if desired.
This change makes Store more verbose but i think it is the right direction to allow
developer to expand on it as desired
* update AGP to 3.6-alpha11
* update pipeline store tests to check finite streams
This CL updates PipelineStoreTest to consume the whole stream
when we expect it to finish rather than limiting the number of
dispatched items
* update RoomActivity to respect new StoreResponse
* add search to room activity
* code cleanup
This PR adds a cache implementation that has all APIs as suspend functions.
It uses guava's cache under the hood and handles query deduplication in a custom
Entry type that we keep in the cache
* AGP 3.5.0-beta04
* Stream implementation defined in the interface
* New class StoreWrapper
* Delete StoreBuilder
* Rename plus methods
* Move stalePolicy to Persister
* Simplify code
* Move inflight request management to a new class
* Move cache management to a new class
* Move wrappers to new package
* Delete StoreWrapper class
* New test
* Restored old versions
* Restored old versions
* Restored old versions
* Restored old versions
* Restored old versions
* Restored old versions
* Add runCatching to ignore exceptions on persisters
* Backward compatible RealStoreBuilder implementation
* Fix tests
* convert middleware to kotlin, start with tests
* convert source
* pr feedback, change mocks to lateinit
* change compile to implementation
* change rest of compile to use implementation, and append version of kotlin
* remove obsolete constructor checks
* pr feedback convert one liners to assignments
* start conversion of middleware to moshi, tests first
* convert data model of tests
* convert source to kotlin
* pr feedback, change mocks to lateinit
* start of sample app conversion to kotlin
* go with moshi kotlin codegen instead of immutables
* pr feedback, use lateinit and make non-null
* pr feedback, unwind method
* roomStore
* kt the app class
* refactor
* fix compilation
* Update .travis.yml
* migrate relevant tests to RoomStore, mark new Room API with @Experimental
* pr feedback
* bump minor rev up
* cleanup store
* create factory, clean up example
* pr comments