Interface BlocklistHandler
-
- All Known Implementing Classes:
DefaultBlocklistHandler
,NoOpBlocklistHandler
public interface BlocklistHandler
This class is responsible for managing allBlockedNode
s and performing them on resources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
BlocklistHandler.Factory
Factory to instantiateBlocklistHandler
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addNewBlockedNodes(Collection<BlockedNode> newNodes)
Add new blocked node records.void
deregisterBlocklistListener(BlocklistListener blocklistListener)
Deregister a blocklist listener.Set<String>
getAllBlockedNodeIds()
Get all blocked node ids.boolean
isBlockedTaskManager(ResourceID taskManagerId)
Returns whether the given task manager is blocked (located on blocked nodes).void
registerBlocklistListener(BlocklistListener blocklistListener)
Register a new blocklist listener.
-
-
-
Method Detail
-
addNewBlockedNodes
void addNewBlockedNodes(Collection<BlockedNode> newNodes)
Add new blocked node records. If a node (identified by node id) already exists, the newly added one will be merged with the existing one.- Parameters:
newNodes
- the new blocked node records
-
isBlockedTaskManager
boolean isBlockedTaskManager(ResourceID taskManagerId)
Returns whether the given task manager is blocked (located on blocked nodes).- Parameters:
taskManagerId
- ID of the task manager to query- Returns:
- true if the given task manager is blocked, otherwise false
-
getAllBlockedNodeIds
Set<String> getAllBlockedNodeIds()
Get all blocked node ids.- Returns:
- a set containing all blocked node ids
-
registerBlocklistListener
void registerBlocklistListener(BlocklistListener blocklistListener)
Register a new blocklist listener.- Parameters:
blocklistListener
- the newly registered listener
-
deregisterBlocklistListener
void deregisterBlocklistListener(BlocklistListener blocklistListener)
Deregister a blocklist listener.- Parameters:
blocklistListener
- the listener to deregister
-
-