Class TestServer
- java.lang.Object
-
- org.eclipse.jetty.util.thread.strategy.jmh.TestServer
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,TryExecutor
public class TestServer extends java.lang.Object implements java.util.concurrent.Executor, TryExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.TryExecutor
TryExecutor.NoTryExecutor
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jetty.util.thread.TryExecutor
NO_TRY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.Runnable task)
java.io.File
getFile(java.lang.String path)
int
getRandom(int max)
java.util.Map<java.lang.String,java.lang.String>
getSession(java.lang.String sessionid)
void
start()
void
stop()
boolean
tryExecute(java.lang.Runnable task)
Attempt to execute a task.
-
-
-
Method Detail
-
getSession
public java.util.Map<java.lang.String,java.lang.String> getSession(java.lang.String sessionid)
-
getRandom
public int getRandom(int max)
-
execute
public void execute(java.lang.Runnable task)
- Specified by:
execute
in interfacejava.util.concurrent.Executor
- Specified by:
execute
in interfaceTryExecutor
-
tryExecute
public boolean tryExecute(java.lang.Runnable task)
Description copied from interface:TryExecutor
Attempt to execute a task.- Specified by:
tryExecute
in interfaceTryExecutor
- Parameters:
task
- The task to be executed- Returns:
- True IFF the task has been given directly to a thread to execute. The task cannot be queued pending the later availability of a Thread.
-
start
public void start() throws java.lang.Exception
- Throws:
java.lang.Exception
-
stop
public void stop() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getFile
public java.io.File getFile(java.lang.String path)
-
-