public class ServerActionExecutor extends Object
Constructor and Description |
---|
ServerActionExecutor(ActionDBAccessor db,
long sleepTimeMS)
Creates a new ServerActionExecutor
|
Modifier and Type | Method and Description |
---|---|
void |
awake()
Attempts to force this ServerActionExecutor to wake up and do work.
|
void |
doWork()
Execute the logic to handle each task in the queue in the order in which it was queued.
|
static void |
init(com.google.inject.Injector injector)
Statically initialize the Injector
This should only be used for unit tests.
|
void |
start()
Starts this ServerActionExecutor's main thread.
|
void |
stop()
Attempts to stop this ServerActionExecutor's main thread.
|
public ServerActionExecutor(ActionDBAccessor db, long sleepTimeMS)
db
- the ActionDBAccessor to use to read and update taskssleepTimeMS
- the time (in milliseconds) to wait between polling the database for more taskspublic static void init(com.google.inject.Injector injector)
injector
- the Injector to (manually) statically injectpublic void start()
public void stop()
public void awake()
public void doWork() throws InterruptedException
InterruptedException
Copyright © 2022 Apache Software Foundation. All rights reserved.