|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.cache.SerializationPagedCache.PagedBinaryStore
public class SerializationPagedCache.PagedBinaryStore
A virtual BinaryStore implementation that aggregates a sequence (newest to oldest) of periodic BinaryStore objects.
Constructor Summary | |
---|---|
SerializationPagedCache.PagedBinaryStore(int cPages)
Construct a PagedBinaryStore. |
Method Summary | |
---|---|
protected SerializationPagedCache.WrapperBinaryStore |
advanceCurrentPage(SerializationPagedCache.WrapperBinaryStore store)
Advance the current page, using the passed BinaryStore as the store for the new current page, and returning the oldest active page, if the maximum number of active pages is exceeded by the advancing of the current page. |
void |
close()
Release underlying resources. |
void |
erase(Binary binKey)
Remove the specified key from the underlying store if present. |
void |
eraseAll()
Remove all data from the underlying store. |
SerializationPagedCache.WrapperBinaryStore[] |
getActivePageArray()
Get the array of BinaryStore objects, one for each active page. |
int |
getActivePageCount()
Determine the number of pages that the PagedBinaryStore is currently managing. |
protected SerializationPagedCache.WrapperBinaryStore |
getCurrentPage()
Obtain the page to which current updates are being performed. |
int |
getCurrentPageNumber()
Determine the number of pages that the PagedBinaryStore has managed in total, including those it is currently managing. |
int |
getMaximumPages()
Determine the maximum number of pages that the cache will manage, beyond which the oldest pages are destroyed. |
protected SerializationPagedCache.WrapperBinaryStore |
getOldestActivePage()
Obtain the oldest active page. |
SerializationPagedCache.WrapperBinaryStore |
getPage(int nPage)
Get the BinaryStore for the page specified by the passed page number. |
protected Map |
getPagedKeyMap()
Obtain the map that manages the mapping from Binary keys to BinaryStore objects. |
int |
getTotalPageCount()
Determine the number of pages that the PagedBinaryStore has managed in total, including those it is currently managing. |
boolean |
isPageActive(int nPage)
Determine if the specified page number is active. |
Iterator |
keys()
Iterate all keys in the underlying store. |
Binary |
load(Binary binKey)
Return the value associated with the specified key, or null if the key does not have an associated value in the underlying store. |
protected void |
logException(Throwable e,
String sMethod)
Helper to log ignored exceptions. |
void |
store(Binary binKey,
Binary binValue)
Store the specified value under the specific key in the underlying store. |
protected int |
toPageIndex(int nPage)
Translate a page number to an index into the PageArray. |
Constructor Detail |
---|
public SerializationPagedCache.PagedBinaryStore(int cPages)
cPages
- the maximum number of pages to have active at a
timeMethod Detail |
---|
public Binary load(Binary binKey)
load
in interface BinaryStore
binKey
- key whose associated value is to be returned
public void store(Binary binKey, Binary binValue)
store
in interface BinaryStore
binKey
- key to store the value underbinValue
- value to be storedpublic void erase(Binary binKey)
erase
in interface BinaryStore
binKey
- key whose mapping is to be removed from the mappublic void eraseAll()
eraseAll
in interface BinaryStore
public Iterator keys()
keys
in interface BinaryStore
public void close()
public int getMaximumPages()
public int getActivePageCount()
public int getTotalPageCount()
public int getCurrentPageNumber()
public boolean isPageActive(int nPage)
nPage
- the page number to test
public SerializationPagedCache.WrapperBinaryStore[] getActivePageArray()
public SerializationPagedCache.WrapperBinaryStore getPage(int nPage)
nPage
- the page number
protected SerializationPagedCache.WrapperBinaryStore getCurrentPage()
protected SerializationPagedCache.WrapperBinaryStore getOldestActivePage()
protected int toPageIndex(int nPage)
nPage
- the page number
protected Map getPagedKeyMap()
protected SerializationPagedCache.WrapperBinaryStore advanceCurrentPage(SerializationPagedCache.WrapperBinaryStore store)
store
- the BinaryStore to use for the new current page
protected void logException(Throwable e, String sMethod)
e
- the throwable objectsMethod
- the calling method name
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |