SMILA (incubation) API documentation

org.eclipse.smila.taskworker.io
Class IODataObject

java.lang.Object
  extended by org.eclipse.smila.taskworker.io.IODataObject
Direct Known Subclasses:
Input, Output

public abstract class IODataObject
extends java.lang.Object

common base class of input/output wrappers. Apart from containing the defining BulkInfo object and providing access to the bulk store, it does some basic IO duration measuring.


Field Summary
protected  ObjectStoreService _objectStore
          reference of objectstore service.
 
Constructor Summary
IODataObject(BulkInfo dataObject, ObjectStoreService objectStore)
          create instance.
 
Method Summary
protected  void ensureStore()
          open store, retry on IOErrors.
 java.util.Map<java.lang.String,java.lang.Number> getCounter()
          create basic counter map.
 BulkInfo getDataObject()
           
 long getDurationOpen()
           
 long getDurationPerform()
           
 java.lang.String getObjectName()
           
 ObjectStoreService getObjectStore()
           
 java.lang.String getStoreName()
           
protected  long startTime()
           
protected  void timeOpen(long startTime)
          measure time for opening data object.
protected  void timePerform(long startTime)
          measure time for performing IO on data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_objectStore

protected final ObjectStoreService _objectStore
reference of objectstore service.

Constructor Detail

IODataObject

public IODataObject(BulkInfo dataObject,
                    ObjectStoreService objectStore)
create instance.

Method Detail

getDataObject

public BulkInfo getDataObject()
Returns:
wrapped data object.

getStoreName

public java.lang.String getStoreName()
Returns:
store name part of wrapped data object.

getObjectName

public java.lang.String getObjectName()
Returns:
object ID part of wrapped data object.

getObjectStore

public ObjectStoreService getObjectStore()
Returns:
reference to objectstore service.

ensureStore

protected void ensureStore()
                    throws ObjectStoreException
open store, retry on IOErrors.

Throws:
ObjectStoreException

getCounter

public java.util.Map<java.lang.String,java.lang.Number> getCounter()
create basic counter map.


getDurationOpen

public long getDurationOpen()
Returns:
duration needed to open the data object.

getDurationPerform

public long getDurationPerform()
Returns:
duration needed to perform IO operations on the data object.

startTime

protected long startTime()
Returns:
current timestamp.

timeOpen

protected void timeOpen(long startTime)
measure time for opening data object.


timePerform

protected void timePerform(long startTime)
measure time for performing IO on data object.


SMILA (incubation) API documentation