Class LocalNewSessionQueue

java.lang.Object
org.openqa.selenium.grid.sessionqueue.NewSessionQueue
org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue
All Implemented Interfaces:
Closeable, AutoCloseable, HttpHandler, Routable, HasReadyState

public class LocalNewSessionQueue extends NewSessionQueue implements Closeable
An in-memory implementation of the list of new session requests.

The lifecycle of a request can be described as:

  1. User adds an item on to the queue using addToQueue(SessionRequest). This will block until the request completes in some way.
  2. If the session request is completed, then complete(RequestId, Either) must be called. This will ensure that addToQueue(SessionRequest) returns.
  3. If the request cannot be handled right now, call retryAddToQueue(SessionRequest) to return the session request to the front of the queue.

There is a background thread that will reap SessionRequests that have timed out. This means that a request can either complete by a listener calling complete(RequestId, Either) directly, or by being reaped by the thread.