Package org.jppf.io

Class AbstractDataLocation

java.lang.Object
org.jppf.io.AbstractDataLocation
All Implemented Interfaces:
DataLocation
Direct Known Subclasses:
FileDataLocation, MultipleBuffersLocation

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 Details

    • size

      protected int size
      The capacity of the underlying buffer.
    • transferring

      protected boolean transferring
      Determines whether a transfer has been started.
  • Constructor Details

    • AbstractDataLocation

      public AbstractDataLocation()
  • Method Details

    • 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.
    • 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.