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.service
Class SimulatedWithCloningPeerService

    java.lang.Object
      lbg.peer.service.SimulatedPeerService
          lbg.peer.service.SimulatedWithCloningPeerService

All Implemented Interfaces:
  AbstractExternalPeerHandle, AbstractInternalPeerHandle, AbstractUserPeerHandle, PeerService

    public class SimulatedWithCloningPeerService

extends SimulatedPeerService

A partial reimplementation of SimulatedPeerService where incoming Tasks are cloned before being passed to the overridden method.

Author:
  Cyril Briquet

Constructor Summary
`SimulatedWithCloningPeerService(Peer owner_peer)`

Method Summary
`void` | `cancelLocalTaskOnSupplyingResource(java.lang.String supplier_id, Task t)`
`void` | `cancelSupplyingTaskOnLocalResource(java.lang.String consumer_id, Task t)`
`ConsumptionTaskID` | `computeSupplyingTask(java.lang.String consumer_id, Task t)`
`void` | `preemptLocalTaskOnLocalResource(Task t, byte[] logs)`
`void` | `preemptSupplyingTaskOnLocalResource(java.lang.String consumer_id, Task t, byte[] logs)`
`java.lang.String` | `toString()`
`void` | `uploadBySupplyingCompletedTask(java.lang.String supplier_id, Task t)`
`void` | `uploadLocallyCompletedTask(Task t)`

Methods inherited from class lbg.peer.service.SimulatedPeerService
`addResource, cancelJob, createHandle, grantConsumption, hostname, id, isAlive, peerPort, queryJobStatus, removeResource, requestSupplying, resourcePort, submitJob, userPort`

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

Constructor Detail

### SimulatedWithCloningPeerService

    public SimulatedWithCloningPeerService(Peer owner_peer)
                                    throws GridException

Throws:
  `GridException`

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `SimulatedPeerService`

### computeSupplyingTask

    public ConsumptionTaskID computeSupplyingTask(java.lang.String consumer_id,
                                                  Task t)
                                           throws GridException

  Specified by:
    `computeSupplyingTask` in interface `AbstractExternalPeerHandle`
  Overrides:
    `computeSupplyingTask` in class `SimulatedPeerService`
  Throws:
    `GridException`

### cancelSupplyingTaskOnLocalResource

    public void cancelSupplyingTaskOnLocalResource(java.lang.String consumer_id,
                                                   Task t)
                                            throws GridException

  Specified by:
    `cancelSupplyingTaskOnLocalResource` in interface `AbstractExternalPeerHandle`
  Overrides:
    `cancelSupplyingTaskOnLocalResource` in class `SimulatedPeerService`
  Throws:
    `GridException`

### cancelLocalTaskOnSupplyingResource

    public void cancelLocalTaskOnSupplyingResource(java.lang.String supplier_id,
                                                   Task t)
                                            throws GridException

  Specified by:
    `cancelLocalTaskOnSupplyingResource` in interface `AbstractExternalPeerHandle`
  Overrides:
    `cancelLocalTaskOnSupplyingResource` in class `SimulatedPeerService`
  Throws:
    `GridException`

### uploadBySupplyingCompletedTask

    public void uploadBySupplyingCompletedTask(java.lang.String supplier_id,
                                               Task t)
                                        throws GridException

  Specified by:
    `uploadBySupplyingCompletedTask` in interface `AbstractExternalPeerHandle`
  Overrides:
    `uploadBySupplyingCompletedTask` in class `SimulatedPeerService`
  Throws:
    `GridException`

### preemptLocalTaskOnLocalResource

    public void preemptLocalTaskOnLocalResource(Task t,
                                                byte[] logs)
                                         throws GridException

  Specified by:
    `preemptLocalTaskOnLocalResource` in interface `AbstractInternalPeerHandle`
  Overrides:
    `preemptLocalTaskOnLocalResource` in class `SimulatedPeerService`
  Throws:
    `GridException`

### preemptSupplyingTaskOnLocalResource

    public void preemptSupplyingTaskOnLocalResource(java.lang.String consumer_id,
                                                    Task t,
                                                    byte[] logs)
                                             throws GridException

  Specified by:
    `preemptSupplyingTaskOnLocalResource` in interface `AbstractInternalPeerHandle`
  Overrides:
    `preemptSupplyingTaskOnLocalResource` in class `SimulatedPeerService`
  Throws:
    `GridException`

### uploadLocallyCompletedTask

    public void uploadLocallyCompletedTask(Task t)
                                    throws GridException

  Specified by:
    `uploadLocallyCompletedTask` in interface `AbstractInternalPeerHandle`
  Overrides:
    `uploadLocallyCompletedTask` in class `SimulatedPeerService`
  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.