-
Notifications
You must be signed in to change notification settings - Fork 582
dev.meetings
Next public meeting on G+ Hangout on Air at 11:30pm IST / 8pm CET / 2pm EST / 11am PST
-
CRUD operations & 107
-
Resilient Cache ?
-
CIaaS: travis-ci
-
Eclipse & Gradle
Use the Q&A app on the Hangout on Air for additional ideas or thoughts…
Recording available here on YouTube
We want CacheBuilder to create instances of types:
-
Unmanaged(ShortLived)Cache
-
UnmanagedLongLivedCache
While CacheManagerBuilder create:
-
(ShortLived)CacheManager
-
LongLivedCacheManager
which manages Cache, i.e. not Unmanaged ones. LongLived exposes the methods to delete 'persistent' data (i.e. that outlives the life of the JVM). A Cache is closed or destroyed through the CacheManager.
Issues are now ordered on waffle.io:
-
'API' labeled issues for public API require
-
JavaDoc
-
-
'API' labeled issues that are about SPI, require
-
JavaDoc
-
Tester of some kind, that
-
-
'Enhancement' labeled issues require
-
JavaDoc, as required
-
Unit tests
-
If ported from the 2.x line, best is to have decent coverage on the responsibilities the class will keep, prior to refactoring it; then refactor and add/tweak tests as required
-
Recording available here on YouTube
Let’s try to introduce a type hierarchy for both Cache and CacheManager that the builder would actually build, narrowing the type down à la Quartz 2.0 builders.
PersistentCache cache = newCacheBuilder() // (1)
.diskPersistent(
cfg // (3)
) // (2)
.build(); // (4)
-
static method that creates a builder: Builder<Cache>
-
narrows to the builder’s type down to Builder<PersistentCache>
-
cfg actually defines the mode to use for persistence, eg: expect data on disk; expect none; use data if there; wipe data if there; wipe data on Cache.close()
-
actually builds the PersistentCache
Alex to make an actual proposal by next week.
-
Keep these, where the user is actually responsible to provide services
-
Only these Cache's type would expose .close()
-
CacheManager managed Cache instances would be 'closed' through the CacheManager
-
To further lifecycle PersistentCache instance, managed by a CacheManager, the latter could expose some method to retrieve DiskPersisted (interface with minimal lifecycle methods) instances; e.g.
Iterable<Map.Entry<String, DiskPersisted>> it = cacheManager.getManaged(DiskPersisted.class); it.next().value() // (1) .deleteOnDiskFiles(); // (2)
-
DiskPersisted could expose methods around lifecycling the data on disk only. No Cache methods
-
Implies Cache.close(), i.e. clear all 'VM transient' data and delete data from disk.
Recording available here on YouTube