Class LocalDistributor
java.lang.Object
org.openqa.selenium.grid.distributor.Distributor
org.openqa.selenium.grid.distributor.local.LocalDistributor
- All Implemented Interfaces:
Closeable,AutoCloseable,Predicate<HttpRequest>,HttpHandler,Routable,HasReadyState
-
Constructor Summary
ConstructorsConstructorDescriptionLocalDistributor(Tracer tracer, EventBus bus, HttpClient.Factory clientFactory, SessionMap sessions, NewSessionQueue sessionQueue, SlotSelector slotSelector, Secret registrationSecret, Duration healthcheckInterval, boolean rejectUnsupportedCaps, Duration sessionRequestRetryInterval, int newSessionThreadPoolSize, SlotMatcher slotMatcher, Duration purgeNodesInterval) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static Distributorbooleanintprotected Set<NodeStatus>longintprotected NodegetNodeFromURI(URI uri) longbooleanisReady()newSession(SessionRequest request) voidrefresh()voidMethods inherited from class org.openqa.selenium.grid.distributor.Distributor
execute, matches, test
-
Constructor Details
-
LocalDistributor
public LocalDistributor(Tracer tracer, EventBus bus, HttpClient.Factory clientFactory, SessionMap sessions, NewSessionQueue sessionQueue, SlotSelector slotSelector, Secret registrationSecret, Duration healthcheckInterval, boolean rejectUnsupportedCaps, Duration sessionRequestRetryInterval, int newSessionThreadPoolSize, SlotMatcher slotMatcher, Duration purgeNodesInterval)
-
-
Method Details
-
create
-
isReady
public boolean isReady()- Specified by:
isReadyin interfaceHasReadyState
-
add
- Specified by:
addin classDistributor
-
drain
- Specified by:
drainin classDistributor
-
remove
- Specified by:
removein classDistributor
-
getStatus
- Specified by:
getStatusin classDistributor
-
refresh
-
getAvailableNodes
-
newSession
public Either<SessionNotCreatedException,CreateSessionResponse> newSession(SessionRequest request) throws SessionNotCreatedException - Specified by:
newSessionin classDistributor- Throws:
SessionNotCreatedException
-
getUpNodeCount
public long getUpNodeCount() -
getDownNodeCount
public long getDownNodeCount() -
getActiveSlots
public int getActiveSlots() -
getIdleSlots
public int getIdleSlots() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getNodeFromURI
-