public class DefaultBlocklistHandler extends Object implements BlocklistHandler, AutoCloseable
BlocklistHandler
.Modifier and Type | Class and Description |
---|---|
static class |
DefaultBlocklistHandler.Factory
The factory to instantiate
DefaultBlocklistHandler . |
Modifier and Type | Method and Description |
---|---|
void |
addNewBlockedNodes(Collection<BlockedNode> newNodes)
Add new blocked node records.
|
void |
close() |
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.
|
public void addNewBlockedNodes(Collection<BlockedNode> newNodes)
BlocklistHandler
addNewBlockedNodes
in interface BlocklistHandler
newNodes
- the new blocked node recordspublic boolean isBlockedTaskManager(ResourceID taskManagerId)
BlocklistHandler
isBlockedTaskManager
in interface BlocklistHandler
taskManagerId
- ID of the task manager to querypublic Set<String> getAllBlockedNodeIds()
BlocklistHandler
getAllBlockedNodeIds
in interface BlocklistHandler
public void registerBlocklistListener(BlocklistListener blocklistListener)
BlocklistHandler
registerBlocklistListener
in interface BlocklistHandler
blocklistListener
- the newly registered listenerpublic void deregisterBlocklistListener(BlocklistListener blocklistListener)
BlocklistHandler
deregisterBlocklistListener
in interface BlocklistHandler
blocklistListener
- the listener to deregisterpublic void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.