Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`protected` | `SimulatedResourceService(SimulatedResource owner_resource)`

Method Summary
`int` | `cacheCapacity()`
`void` | `cancelTask()`
`ResourceHandle` | `createHandle()`
`long` | `expectedTaskRuntime()`
`java.lang.String` | `id()`
`boolean` | `idle()`
`boolean` | `isAlive()`
`Task` | `runningTask()` Deprecated.
`boolean` | `runTask(Task t, GridData[][] working_set)`
`boolean` | `setWorkingSet(GridData[][] working_set)`
`long` | `taskStartTime()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimulatedResourceService

    protected SimulatedResourceService(SimulatedResource owner_resource)
                                throws GridException

Throws:
  `GridException`

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| 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.