public class OutOfCoreIOScheduler extends Object
Modifier and Type | Field and Description |
---|---|
static IntConfOption |
OOC_WAIT_INTERVAL
If an IO thread does not have any command to do, it waits for certain a
period and check back again to see if there exist any command to perform.
|
Modifier and Type | Method and Description |
---|---|
void |
addIOCommand(IOCommand ioCommand)
Add an IO command to the scheduling queue of the IO scheduler
|
IOCommand |
getNextIOCommand(int threadId)
Generate and return the next appropriate IO command for a given thread
|
void |
ioCommandCompleted(IOCommand command)
Notify IO scheduler that the IO command is completed
|
void |
shutdown()
Shutdown/Terminate the IO scheduler, and notify all IO threads to halt
|
public static final IntConfOption OOC_WAIT_INTERVAL
public IOCommand getNextIOCommand(int threadId)
threadId
- id of the thread ready to execute the next IO commandpublic void ioCommandCompleted(IOCommand command)
command
- completed commandpublic void addIOCommand(IOCommand ioCommand)
ioCommand
- IO command to add to the schedulerpublic void shutdown()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.