lbg.resource.service
Class SimulatedResourceHandle
java.lang.Object
lbg.resource.service.SimulatedResourceHandle
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ResourceHandle>, AbstractResourceHandle, ResourceHandle
public class SimulatedResourceHandle
- extends java.lang.Object
- implements ResourceHandle
- Author:
- Cyril Briquet
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SimulatedResourceHandle
public SimulatedResourceHandle(java.lang.String id,
SimulatedResourceService resource_service)
throws GridException
- Throws:
GridException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
compareTo
public int compareTo(ResourceHandle other)
- Specified by:
compareTo
in interface java.lang.Comparable<ResourceHandle>
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
id
public java.lang.String id()
- Specified by:
id
in interface AbstractResourceHandle
cacheCapacity
public int cacheCapacity()
- Specified by:
cacheCapacity
in interface AbstractResourceHandle
idle
public boolean idle()
- Specified by:
idle
in interface AbstractResourceHandle
isAlive
public boolean isAlive()
- Specified by:
isAlive
in interface AbstractResourceHandle
runningTask
@Deprecated
public Task runningTask()
- Deprecated.
- Specified by:
runningTask
in interface AbstractResourceHandle
runTask
public boolean runTask(Task t,
GridData[][] working_set)
throws GridException
- Specified by:
runTask
in interface AbstractResourceHandle
- Returns:
- true if the data described by the working set can be stored
in the Resource data cache,
or false if the working set size is larger than the cache limit,
or if the data couldn't be scheduled for download
- Throws:
GridException
setWorkingSet
public boolean setWorkingSet(GridData[][] working_set)
throws GridException
- Sets a resource's working set
- Specified by:
setWorkingSet
in interface AbstractResourceHandle
- Returns:
- true if the data described by the working set can be stored
in the Resource data cache,
or false if the working set size is larger than the cache limit,
or if the data couldn't be scheduled for download
- Throws:
GridException
- See Also:
GridDataManager.setWorkingSet(GridData[])
- To do:
- check this
cancelTask
public void cancelTask()
throws GridException
- Specified by:
cancelTask
in interface AbstractResourceHandle
- Throws:
GridException
expectedTaskRuntime
public long expectedTaskRuntime()
throws GridException
- Throws:
GridException
taskStartTime
public long taskStartTime()
- Specified by:
taskStartTime
in interface AbstractResourceHandle
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.