Rapidly fast and lightweight re-implementation of SharedPreferences which stores each preference in files separately, performs disk operations via NIO with memory mapped byte buffers and works IPC (between processes). Written from scratch.
Changed base64 file name algorithm to custom file-safe name encoding
with only lower cased chars and numbers table (a-z-0-9). Sorry guys if you use
XorKeyEncryptionImpl
implementation as file name encryption just rename your
preferences directory after updating up to 1.0.0-beta2.
Improved performance for cache initialization (especially for Set<String>
and getAll
method).
Few cosmetic changes and some javadoc updates for several api.
Added fetch strategies as public api. Now you can choose what kind
of initialization to perform. This allows you to define what of two
initial fetching variants to use:
MemoryCacheMode.EAGER
- fills in-memory cache immediately, sometimes it take a long time
MemoryCacheMode.LAZY
- fills in-memory cache on demand, initial fetching is only store meta
Added byte array serializer as public api. Now you can store your binary data right in storage fast and securly as possible.
getAll
method now deprecated. Please, use keys
mehtod for getting
all preferences keys because getAll
always creates overhead for in-mem
utilization.
Implemented twice or more transaction running check.
Now if you trying to call apply
or commit
twice or more for one
instance of PreferencesEditor
- TransactionInvalidatedException
will be thrown.
Internal api changes (global locks refactoring, structural changes, reduced references creation for transactions).
Final small bug fixes.