lbg.resource.service
Class SimulatedResourceService
java.lang.Object
lbg.resource.service.SimulatedResourceService
- All Implemented Interfaces:
- AbstractResourceHandle, ResourceService
public class SimulatedResourceService
- extends java.lang.Object
- implements ResourceService
- Author:
- Cyril Briquet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SimulatedResourceService
protected SimulatedResourceService(SimulatedResource owner_resource)
throws GridException
- Throws:
GridException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
createHandle
public ResourceHandle createHandle()
throws GridException
- Specified by:
createHandle in interface ResourceService
- Throws:
GridException
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
- 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
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.