public abstract class IOCommand extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IOCommand.IOCommandType
Type of IO command
|
Modifier and Type | Field and Description |
---|---|
protected long |
numBytesTransferred
Number of bytes transferred to/from memory (loaded/stored) during the
execution of the command
|
protected OutOfCoreEngine |
oocEngine
Out-of-core engine
|
protected int |
partitionId
Id of the partition involved for the IO
|
Constructor and Description |
---|
IOCommand(OutOfCoreEngine oocEngine,
int partitionId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
bytesTransferred()
Get the number of bytes transferred (loaded/stored from/to disk).
|
abstract boolean |
execute()
Execute (load/store of data) the IO command, and change the data stores
appropriately based on the data loaded/stored.
|
int |
getPartitionId()
Get the id of the partition involved in the IO
|
abstract IOCommand.IOCommandType |
getType()
Get the type of the command.
|
protected final int partitionId
protected final OutOfCoreEngine oocEngine
protected long numBytesTransferred
public IOCommand(OutOfCoreEngine oocEngine, int partitionId)
oocEngine
- Out-of-core enginepartitionId
- Id of the partition involved in the IOpublic int getPartitionId()
public abstract boolean execute() throws IOException
IOException
public abstract IOCommand.IOCommandType getType()
public long bytesTransferred()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.