Class LocalGridModel
java.lang.Object
org.openqa.selenium.grid.distributor.GridModel
org.openqa.selenium.grid.distributor.local.LocalGridModel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(NodeStatus node) Adds a node to the grid model, typically starting with DOWN availability until health checks pass.static LocalGridModel
Gets a snapshot of all node statuses currently in the grid model.void
Removes nodes that have been unresponsive for too long.void
refresh
(NodeStatus status) Refreshes a node's status in the grid model.void
release
(org.openqa.selenium.remote.SessionId id) Releases a session, making its slot available again.void
Removes a node from the grid model.boolean
Attempts to reserve a specific slot on a node.void
setAvailability
(NodeId id, Availability availability) Sets the availability status for a node.void
setSession
(SlotId slotId, Session session) Updates a reserved slot to contain an actual session.void
touch
(NodeStatus nodeStatus) Updates the timestamp for a node to prevent it from being considered stale.void
updateHealthCheckCount
(NodeId id, Availability availability) Updates the health check count for a node based on its availability.
-
Constructor Details
-
LocalGridModel
-
-
Method Details
-
create
-
add
Description copied from class:GridModel
Adds a node to the grid model, typically starting with DOWN availability until health checks pass. -
refresh
Description copied from class:GridModel
Refreshes a node's status in the grid model. -
touch
Description copied from class:GridModel
Updates the timestamp for a node to prevent it from being considered stale. May also update the node's availability if reported differently. -
remove
Description copied from class:GridModel
Removes a node from the grid model. -
purgeDeadNodes
public void purgeDeadNodes()Description copied from class:GridModel
Removes nodes that have been unresponsive for too long.- Specified by:
purgeDeadNodes
in classGridModel
-
setAvailability
Description copied from class:GridModel
Sets the availability status for a node.- Specified by:
setAvailability
in classGridModel
- Parameters:
id
- The ID of the nodeavailability
- The new availability status
-
reserve
Description copied from class:GridModel
Attempts to reserve a specific slot on a node. -
getSnapshot
Description copied from class:GridModel
Gets a snapshot of all node statuses currently in the grid model.- Specified by:
getSnapshot
in classGridModel
- Returns:
- A set of node statuses
-
release
public void release(org.openqa.selenium.remote.SessionId id) Description copied from class:GridModel
Releases a session, making its slot available again. -
setSession
Description copied from class:GridModel
Updates a reserved slot to contain an actual session.- Specified by:
setSession
in classGridModel
- Parameters:
slotId
- The ID of the slot to updatesession
- The session to associate with the slot, or null to clear
-
updateHealthCheckCount
Description copied from class:GridModel
Updates the health check count for a node based on its availability.- Specified by:
updateHealthCheckCount
in classGridModel
- Parameters:
id
- The ID of the nodeavailability
- The current availability status
-