Top Inners Methods
com.mchange.v1.cachedstore

public Interface WritableCachedStore

extends CachedStore
Known Direct Implementers
com.mchange.v1.cachedstore.NoCacheWritableCachedStore, com.mchange.v1.cachedstore.SimpleWritableCachedStore
Imports
java.util.Set

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Method Summary

Modifier and TypeMethod and Description
public void
clearPendingWrites()

Clears any pending (unflushed or failed) writes and removes.

public void
flushWrites()

flushes writes to back end, IN NO PARTICULAR ORDER!

public Set<E>

Returns:

null if all attempts to write to backend storage have succeeded, an unmodifiable Set of keys otherwise. failedWrites includes keys for whom a call to write or remove initially succeeded, but an attempt to flush the write to storage failed. A failed write may be any of an attempted first write, overwrite, or remove.
getFailedWrites
()

public void
public void
reset()

Redeclares com.mchange.v1.cachedstore.CachedStore.reset.

Clears (WITHOUT WRITING) any pending (unflushed or failed) writes and removes, and any cached reads.

public void
sync()

flushes writes and then clears cached reads.

public void
write(Object key, Object value)

Inherited from com.mchange.v1.cachedstore.CachedStore:
find

Method Detail

clearPendingWritesback to summary
public void clearPendingWrites() throws CachedStoreException

Clears any pending (unflushed or failed) writes and removes.

flushWritesback to summary
public void flushWrites() throws CacheFlushException

flushes writes to back end, IN NO PARTICULAR ORDER! (If you write a key twice, the second write reliably supercedes the first, however.) If this method fails, you can use getFailedWrites() to see what keys could not be written. Values that failed to write are still "pending": they will attempt to write on the next flush, and will still be read from the cache. Use clearPendingWrites() to avoid seeing or writing these values again.

getFailedWritesback to summary
public Set<E> getFailedWrites() throws CachedStoreException
Returns:Set<E>

null if all attempts to write to backend storage have succeeded, an unmodifiable Set of keys otherwise. failedWrites includes keys for whom a call to write or remove initially succeeded, but an attempt to flush the write to storage failed. A failed write may be any of an attempted first write, overwrite, or remove.

removeback to summary
public void remove(Object key) throws CachedStoreException
resetback to summary
public void reset() throws CachedStoreException

Redeclares com.mchange.v1.cachedstore.CachedStore.reset.

Clears (WITHOUT WRITING) any pending (unflushed or failed) writes and removes, and any cached reads.

syncback to summary
public void sync() throws CachedStoreException

flushes writes and then clears cached reads. On successful completion, the cache and the back-end store will be in sync with one another.

writeback to summary
public void write(Object key, Object value) throws CachedStoreException
com.mchange.v1.cachedstore back to summary

public Interface WritableCachedStore.Manager

extends Manager

Method Summary

Modifier and TypeMethod and Description
public void
public void
Inherited from com.mchange.v1.cachedstore.CachedStore.Manager:
isDirtyrecreateFromKey

Method Detail

removeFromStorageback to summary
public void removeFromStorage(Object key) throws Exception
writeToStorageback to summary
public void writeToStorage(Object key, Object value) throws Exception