|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.resource.service.LiveResourceHandle
public class LiveResourceHandle
A handle to a resource.
Constructor Summary | |
---|---|
LiveResourceHandle(java.lang.String id,
int cache_capacity,
java.lang.String res_host,
int res_port)
Create a handle to contact a LiveResource |
Method Summary | |
---|---|
int |
cacheCapacity()
|
void |
cancelTask()
Ask a Resource to cancel running Task |
int |
compareTo(ResourceHandle other)
|
void |
delete_me_runTask(Task t)
Deprecated. Specify new Working Set when running a task. |
boolean |
equals(java.lang.Object obj)
|
long |
expectedTaskRuntime()
Ask a Resource to give expected Task runtime |
int |
hashCode()
|
java.lang.String |
id()
|
boolean |
idle()
Checks if a resource if idle. |
boolean |
isAlive()
Gets a resource's network state. |
Task |
runningTask()
Deprecated. |
boolean |
runTask(Task t,
GridData[][] working_set)
Sets a resource's working set then runs a task. |
boolean |
setWorkingSet(GridData[][] working_set)
Sets a resource's working set This call is non-blocking (only verification of the validity of the WS is done before returning: data is not yet downloaded). |
long |
taskStartTime()
Ask a Resource when the running Task has started |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LiveResourceHandle(java.lang.String id, int cache_capacity, java.lang.String res_host, int res_port) throws GridException
id
- The resource IDcache_capacity
- res_host
- A way to contact the resourceres_port
- The port on which the resource listens
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(ResourceHandle other)
compareTo
in interface java.lang.Comparable<ResourceHandle>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String id()
id
in interface AbstractResourceHandle
public int cacheCapacity()
cacheCapacity
in interface AbstractResourceHandle
public int hashCode()
hashCode
in class java.lang.Object
public boolean setWorkingSet(GridData[][] working_set) throws GridException
setWorkingSet
in interface AbstractResourceHandle
GridException
Concept of a Working Set
public boolean idle()
idle
in interface AbstractResourceHandle
public boolean isAlive()
isAlive
in interface AbstractResourceHandle
@Deprecated public Task runningTask()
runningTask
in interface AbstractResourceHandle
@Deprecated public void delete_me_runTask(Task t) throws GridException
GridException
runTask(Task, GridData[][])
public boolean runTask(Task t, GridData[][] working_set) throws GridException
runTask
in interface AbstractResourceHandle
GridException
Concept of a Working Set
public void cancelTask() throws GridException
cancelTask
in interface AbstractResourceHandle
GridException
public long expectedTaskRuntime() throws GridException
GridException
- in case of communication errorpublic long taskStartTime()
taskStartTime
in interface AbstractResourceHandle
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.