org.jppf.io
Class AbstractDataLocation
java.lang.Object
org.jppf.io.AbstractDataLocation
- All Implemented Interfaces:
- DataLocation
- Direct Known Subclasses:
- ByteBufferLocation, FileLocation
public abstract class AbstractDataLocation
- extends Object
- implements DataLocation
Abstract implementation of the DataLocation interface.>br>
This class provides default implementations for the transferFrom(ReadableByteChannel, boolean) and
transferTo(WritableByteChannel, boolean) methods.
- Author:
- Laurent Cohen
|
Field Summary |
protected int |
size
The capacity of the underlying buffer. |
protected boolean |
transferring
Determines whether a transfer has been started. |
|
Method Summary |
int |
getSize()
Get the size of the data referenced by this data location. |
void |
setSize(int size)
Set the size of the data referenced by this data location. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
protected int size
- The capacity of the underlying buffer.
transferring
protected boolean transferring
- Determines whether a transfer has been started.
AbstractDataLocation
public AbstractDataLocation()
getSize
public int getSize()
- Get the size of the data referenced by this data location.
- Specified by:
getSize in interface DataLocation
- Returns:
- the data size as an int.
- See Also:
DataLocation.getSize()
setSize
public void setSize(int size)
- Set the size of the data referenced by this data location.
- Parameters:
size - - the data size as an int.
Copyright © 2005-2010 JPPF Team.