类 EntryCacheDisabled
java.lang.Object
org.apache.bookkeeper.mledger.impl.cache.EntryCacheDisabled
- 所有已实现的接口:
Comparable<EntryCache>,EntryCache
Implementation of cache that always read from BookKeeper.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidasyncReadEntry(org.apache.bookkeeper.client.api.ReadHandle lh, long firstEntry, long lastEntry, boolean isSlowestReader, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) Read entries from the cache or from bookkeeper.voidasyncReadEntry(org.apache.bookkeeper.client.api.ReadHandle lh, PositionImpl position, AsyncCallbacks.ReadEntryCallback callback, Object ctx) Read entry at given position from the cache or from bookkeeper.voidclear()Remove all the entries from the cache.intcompareTo(EntryCache other) evictEntries(long sizeToFree) Force the cache to drop entries to free space.getName()longgetSize()Get the total size in bytes of all the entries stored in this cache.booleanInsert an entry in the cache.voidinvalidateAllEntries(long ledgerId) Remove from the cache all the entries belonging to a specific ledger.voidinvalidateEntries(PositionImpl lastPosition) Remove from cache all the entries related to a ledger up to lastPosition included.voidinvalidateEntriesBeforeTimestamp(long timestamp)
-
构造器详细资料
-
EntryCacheDisabled
-
-
方法详细资料
-
getName
- 指定者:
getName在接口中EntryCache- 返回:
- the name of the cache
-
insert
从接口复制的说明:EntryCacheInsert an entry in the cache. If the overall limit have been reached, this will triggered the eviction of other entries, possibly from other EntryCache instances- 指定者:
insert在接口中EntryCache- 参数:
entry- the entry to be cached- 返回:
- whether the entry was inserted in cache
-
invalidateEntries
从接口复制的说明:EntryCacheRemove from cache all the entries related to a ledger up to lastPosition included.- 指定者:
invalidateEntries在接口中EntryCache- 参数:
lastPosition- the position of the last entry to be invalidated (non-inclusive)
-
invalidateAllEntries
public void invalidateAllEntries(long ledgerId) 从接口复制的说明:EntryCacheRemove from the cache all the entries belonging to a specific ledger.- 指定者:
invalidateAllEntries在接口中EntryCache- 参数:
ledgerId- the ledger id
-
clear
public void clear()从接口复制的说明:EntryCacheRemove all the entries from the cache.- 指定者:
clear在接口中EntryCache
-
evictEntries
从接口复制的说明:EntryCacheForce the cache to drop entries to free space.- 指定者:
evictEntries在接口中EntryCache- 参数:
sizeToFree- the total memory size to free- 返回:
- a pair containing the number of entries evicted and their total size
-
invalidateEntriesBeforeTimestamp
public void invalidateEntriesBeforeTimestamp(long timestamp) - 指定者:
invalidateEntriesBeforeTimestamp在接口中EntryCache
-
asyncReadEntry
public void asyncReadEntry(org.apache.bookkeeper.client.api.ReadHandle lh, long firstEntry, long lastEntry, boolean isSlowestReader, AsyncCallbacks.ReadEntriesCallback callback, Object ctx) 从接口复制的说明:EntryCacheRead entries from the cache or from bookkeeper. Get the entry data either from cache or bookkeeper and mixes up the results in a single list.- 指定者:
asyncReadEntry在接口中EntryCache- 参数:
lh- the ledger handlefirstEntry- the first entry to read (inclusive)lastEntry- the last entry to read (inclusive)isSlowestReader- whether the reader cursor is the most far behind in the streamcallback- the callback object that will be notified when read is donectx- the context object
-
asyncReadEntry
public void asyncReadEntry(org.apache.bookkeeper.client.api.ReadHandle lh, PositionImpl position, AsyncCallbacks.ReadEntryCallback callback, Object ctx) 从接口复制的说明:EntryCacheRead entry at given position from the cache or from bookkeeper. Get the entry data either from cache or bookkeeper and mixes up the results in a single list.- 指定者:
asyncReadEntry在接口中EntryCache- 参数:
lh- the ledger handleposition- position to read the entry fromcallback- the callback object that will be notified when read is donectx- the context object
-
getSize
public long getSize()从接口复制的说明:EntryCacheGet the total size in bytes of all the entries stored in this cache.- 指定者:
getSize在接口中EntryCache- 返回:
- the size of the entry cache
-
compareTo
- 指定者:
compareTo在接口中Comparable<EntryCache>
-