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
Class LightweightBarteringGrid

    java.lang.Object
      lbg.LightweightBarteringGrid

    public abstract class LightweightBarteringGrid

extends java.lang.Object

The Lightweight Bartering Grid middleware allows Peers to gridify their computational and storage Resources, and barter them globally following various negotiation/accounting strategies.

Author:
  Cyril Briquet

Field Summary
`static java.lang.String` | `VERSION` Lightweight Bartering Grid current version.

Constructor Summary
`LightweightBarteringGrid()`

Method Summary
`static java.lang.String[]` | `getJarDependencies()`
`static VirtualizationLevel` | `getMode()` Returns current operating mode.
`static Scenario` | `getScenario()` Returns current Scenario (legal in SIM mode only).
`static long` | `getTime()` Returns current time: SIM mode - in seconds since the beginning of the simulation LIVE mode - in seconds since the epoch
`static void` | `handleGridException(GridException e)`
`static void` | `setMode(VirtualizationLevel mode)` Sets current operating mode (callable only once).
`static void` | `setSimulator(Simulator sim, Scenario sc)` Sets current Simulator and Scenario (legal in SIM mode only).
`static long` | `setTime(long time)` Sets current time to target time (legal in SIM mode only).
`static long` | `shiftTime(long timeshift)` Shifts current time forward by target amount (legal in SIM mode only).
`static java.lang.String` | `welcome()`

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

Field Detail

### VERSION

    public static final java.lang.String VERSION

  Lightweight Bartering Grid current version.

  See Also:
    Constant Field Values

Constructor Detail

### LightweightBarteringGrid

    public LightweightBarteringGrid()

Method Detail

### welcome

    public static java.lang.String welcome()

### setMode

    public static void setMode(VirtualizationLevel mode)
                        throws GridException

  Sets current operating mode (callable only once).

  Parameters:
    `mode` - target operating mode
  Throws:
    `GridException` - if target mode is illegal, or a mode has already been set

### getMode

    public static VirtualizationLevel getMode()

  Returns current operating mode.

  Returns:
    current operating mode

### setSimulator

    public static void setSimulator(Simulator sim,
                                    Scenario sc)
                             throws GridException

  Sets current Simulator and Scenario (legal in SIM mode only).

  Parameters:
    `sim` - target Simulator
    `sc` - target Scenario
  Throws:
    `GridException` - if target Scenario is illegal, or current mode is illegal

### getScenario

    public static Scenario getScenario()
                                throws GridException

  Returns current Scenario (legal in SIM mode only).

  Throws:
    `GridException` - if current mode is illegal

### getTime

    public static long getTime()
                        throws GridException

  Returns current time:
  - SIM mode - in seconds since the beginning of the simulation
  - LIVE mode - in seconds since the epoch

  Returns:
    current time (in seconds)
  Throws:
    `GridException` - if time status is corrupted

### setTime

    public static long setTime(long time)
                        throws GridException

  Sets current time to target time (legal in SIM mode only).

  Parameters:
    `time` - target time
  Returns:
    current time (in seconds)
  Throws:
    `GridException` - if target time is illegal, current mode is illegal, or time status is corrupted

### shiftTime

    public static long shiftTime(long timeshift)
                          throws GridException

  Shifts current time forward by target amount (legal in SIM mode only).

  Parameters:
    `timeshift` - target time shift
  Returns:
    current time (in seconds)
  Throws:
    `GridException` - if target time shift is illegal, current mode is illegal, or time status is corrupted

### handleGridException

    public static void handleGridException(GridException e)

### getJarDependencies

    public static java.lang.String[] getJarDependencies()

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.