public class LowLevelFifoCachePolicy extends Object implements LowLevelCachePolicy
Constructor and Description |
---|
LowLevelFifoCachePolicy() |
Modifier and Type | Method and Description |
---|---|
void |
cache(LlapCacheableBuffer buffer,
LowLevelCache.Priority pri)
Signals to the policy the addition of a new page to the cache directory.
|
void |
debugDumpShort(StringBuilder sb) |
long |
evictSomeBlocks(long memoryToReserve)
Signals to the policy that it has to evict some pages to make room incoming buffers.
|
void |
notifyLock(LlapCacheableBuffer buffer)
Notifies the policy that this buffer is locked, thus take it out of the free list.
|
void |
notifyUnlock(LlapCacheableBuffer buffer)
Notifies the policy that a buffer is unlocked after been used.
|
long |
purge()
Signals to the policy to evict all the unlocked used buffers.
|
void |
setEvictionListener(EvictionListener listener)
Sets the eviction listener dispatcher.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHotBuffers
public void cache(LlapCacheableBuffer buffer, LowLevelCache.Priority pri)
LowLevelCachePolicy
cache
in interface LowLevelCachePolicy
buffer
- buffer to be cachedpri
- the priority of cached elementpublic void notifyLock(LlapCacheableBuffer buffer)
LowLevelCachePolicy
LlapCacheableBuffer.isLocked()
.notifyLock
in interface LowLevelCachePolicy
buffer
- buffer to be locked.public void notifyUnlock(LlapCacheableBuffer buffer)
LowLevelCachePolicy
notifyUnlock
in interface LowLevelCachePolicy
buffer
- buffer that just got unlockedpublic void setEvictionListener(EvictionListener listener)
LowLevelCachePolicy
setEvictionListener
in interface LowLevelCachePolicy
listener
- eviction listener actorpublic long purge()
LowLevelCachePolicy
purge
in interface LowLevelCachePolicy
public long evictSomeBlocks(long memoryToReserve)
LowLevelCachePolicy
memoryToReserve
bytes are evicted.evictSomeBlocks
in interface LowLevelCachePolicy
memoryToReserve
- amount of bytes to be evictedpublic void debugDumpShort(StringBuilder sb)
debugDumpShort
in interface LlapIoDebugDump
Copyright © 2023 The Apache Software Foundation. All rights reserved.