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.peer.core.rms
Class ResourceUsageData

    java.lang.Object
      lbg.peer.core.rms.ResourceUsageData

    public class ResourceUsageData

extends java.lang.Object

Helper class of ResourceManager. Stores usage statistics and WorkingSet of target Resource.

Author:
  Cyril Briquet

Field Summary
`java.lang.String` | `id`
`ResourceHandle` | `rh`
`WorkingSet` | `working_set`

Constructor Summary
`ResourceUsageData(Peer managed_peer, ResourceHandle rh, ResourceDataTracker data_tracker)`

Method Summary
`long` | `getStateChangedTime()` Returns state change time of the monitored Resource.
`long` | `getTotalBusyLocalTime()` Returns total busy Local time of the monitored Resource.
`long` | `getTotalBusySupplyingTime()` Returns total busy Supplying time of the monitored Resource.
`long` | `getTotalIdleTime()` Returns total idle time of the monitored Resource.
`Task` | `runningTask()`
`ResourceState` | `state()`
`java.lang.String` | `toString()`
`void` | `updateTotalBusyLocalTime()` Updates total busy Local time of the monitored Resource.
`void` | `updateTotalBusySupplyingTime()` Updates total busy Supplying time of the monitored Resource.
`void` | `updateTotalIdleTime(ResourceState state, Task t)` Updates total idle time of the monitored Resource.

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

Field Detail

### working_set

    public final WorkingSet working_set

### id

    public final java.lang.String id

### rh

    public final ResourceHandle rh

Constructor Detail

### ResourceUsageData

    public ResourceUsageData(Peer managed_peer,
                             ResourceHandle rh,
                             ResourceDataTracker data_tracker)
                      throws GridException

Throws:
  `GridException`

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### state

    public ResourceState state()

### runningTask

    public Task runningTask()
                     throws GridException

  Throws:
    `GridException`

### getStateChangedTime

    public long getStateChangedTime()

  Returns state change time of the monitored Resource.

  Returns:
    state change time of the monitored Resource

### getTotalIdleTime

    public long getTotalIdleTime()

  Returns total idle time of the monitored Resource.

  Returns:
    total idle time of the monitored Resource

### getTotalBusyLocalTime

    public long getTotalBusyLocalTime()

  Returns total busy Local time of the monitored Resource.

  Returns:
    total busy Local time of the monitored Resource

### getTotalBusySupplyingTime

    public long getTotalBusySupplyingTime()

  Returns total busy Supplying time of the monitored Resource.

  Returns:
    total busy Supplying time of the monitored Resource

### updateTotalIdleTime

    public void updateTotalIdleTime(ResourceState state,
                                    Task t)
                             throws GridException

  Updates total idle time of the monitored Resource.

  Parameters:
    `state` - new state monitored Resource
    `t` - running Task
  Throws:
    `GridException` - if a parameter is illegal

### updateTotalBusyLocalTime

    public void updateTotalBusyLocalTime()
                                  throws GridException

  Updates total busy Local time of the monitored Resource.

  Throws:
    `GridException`

### updateTotalBusySupplyingTime

    public void updateTotalBusySupplyingTime()
                                      throws GridException

  Updates total busy Supplying time of the monitored Resource.

  Throws:
    `GridException`

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.