public class DefaultStoreLoadTracker extends Object implements StoreLoadTracker, BlockClientListener
StoreLoadTracker
that reports load based on open reader/writer streams to the
local block store.
TODO(ggezer): Add a safety net against close calls not being called.Constructor and Description |
---|
DefaultStoreLoadTracker()
Creates the default load tracker instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clientClosed(BlockClient blockClient,
BlockStoreLocation location)
Called when an open block client is closed.
|
void |
clientOpened(BlockClient blockClient,
BlockStoreLocation location)
Called when a new block client is opened.
|
boolean |
loadDetected(BlockStoreLocation... locations)
Used to detect load on particular location.
|
public DefaultStoreLoadTracker()
public boolean loadDetected(BlockStoreLocation... locations)
StoreLoadTracker
loadDetected
in interface StoreLoadTracker
locations
- vararg of locationstrue
if load detected on any given locationpublic void clientOpened(BlockClient blockClient, BlockStoreLocation location)
BlockClientListener
clientOpened
in interface BlockClientListener
blockClient
- the block read/write clientlocation
- the block locationpublic void clientClosed(BlockClient blockClient, BlockStoreLocation location)
BlockClientListener
clientClosed
in interface BlockClientListener
blockClient
- the block read/write clientlocation
- the block locationCopyright © 2023. All Rights Reserved.