Package com.tangosol.io
Class AsyncBinaryStoreManager
java.lang.Object
com.tangosol.io.AsyncBinaryStoreManager
- All Implemented Interfaces:
BinaryStoreManager
An AsyncBinaryStoreManager is a wrapper BinaryStoreManager that creates
wrapper AsyncBinaryStore objects. An AsyncBinaryStore is a BinaryStore
wrapper that performs the "O" portion of its I/O asynchronously (on a
daemon thread.) Since the "O" portion is passed along to the wrapped
BinaryStore on a separate thread, only read operations are blocking, thus
the BinaryStore operations on a whole appear much faster. (It is somewhat
analogous to a write-behind cache.)
In order for the AsyncBinaryStore objects to be used in situations that require a BinaryStoreManager, this class provides a manager for the AsyncBinaryStore objects, but to create the BinaryStore objects that will be wrapped by the AsyncBinaryStore objects, this AsyncBinaryStoreManager class has to be provided with an underlying BinaryStoreManager to wrap.
- Since:
- Coherence 2.5
- Author:
- cp 2004.06.18
-
Constructor Summary
ConstructorDescriptionConstruct an AsyncBinaryStoreManager.AsyncBinaryStoreManager
(BinaryStoreManager manager, int cbMax) Construct an AsyncBinaryStoreManager. -
Method Summary
Modifier and TypeMethodDescriptionFactory method: Returns a new BinaryStore.void
destroyBinaryStore
(BinaryStore store) Lifecycle method: Destroy a BinaryStore previously created by this manager.protected BinaryStoreManager
protected Map
protected int
protected AsyncBinaryStore
Factory method: Instantiate an AsyncBinaryStore.
-
Constructor Details
-
AsyncBinaryStoreManager
Construct an AsyncBinaryStoreManager. An AsyncBinaryStoreManager creates and destroys AsyncBinaryStore objects, which wrap other BinaryStore objects to provide asynchronous write operations.- Parameters:
manager
- the BinaryStoreManager to wrap
-
AsyncBinaryStoreManager
Construct an AsyncBinaryStoreManager. An AsyncBinaryStoreManager creates and destroys AsyncBinaryStore objects, which wrap other BinaryStore objects to provide asynchronous write operations.- Parameters:
manager
- the BinaryStoreManager to wrapcbMax
- the maximum number of bytes to queue before blocking
-
-
Method Details
-
createBinaryStore
Factory method: Returns a new BinaryStore.- Specified by:
createBinaryStore
in interfaceBinaryStoreManager
- Returns:
- a new BinaryStore object
-
destroyBinaryStore
Lifecycle method: Destroy a BinaryStore previously created by this manager.- Specified by:
destroyBinaryStore
in interfaceBinaryStoreManager
- Parameters:
store
- a BinaryStore object previously created by this manager
-
getBinaryStoreManager
- Returns:
- the wrapped BinaryStoreManager
-
getBinaryStoreMap
- Returns:
- the map of created AsyncBinaryStore objects and their corresponding wrapped BinaryStore objects
-
getQueuedLimit
protected int getQueuedLimit()- Returns:
- the maximum number of pending bytes to allow to accumulate for async I/O in each of the AsyncBinaryStore objects created by this manager
-
instantiateAsyncBinaryStore
Factory method: Instantiate an AsyncBinaryStore.- Returns:
- a new AsyncBinaryStore
-