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) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static Distributor
boolean
int
protected Set<NodeStatus>
long
int
protected Node
getNodeFromURI
(URI uri) long
boolean
isReady()
newSession
(SessionRequest request) void
refresh()
void
Methods 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)
-
-
Method Details
-
create
-
isReady
public boolean isReady()- Specified by:
isReady
in interfaceHasReadyState
-
add
- Specified by:
add
in classDistributor
-
drain
- Specified by:
drain
in classDistributor
-
remove
- Specified by:
remove
in classDistributor
-
getStatus
- Specified by:
getStatus
in classDistributor
-
refresh
-
getAvailableNodes
-
newSession
public Either<SessionNotCreatedException,CreateSessionResponse> newSession(SessionRequest request) throws SessionNotCreatedException - Specified by:
newSession
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getNodeFromURI
-