Lightweight Bartering Grid

lbg.peer.core.qms.queue
Class LocalQueueHistory

java.lang.Object
  extended by lbg.peer.core.qms.queue.LocalQueueHistory

public class LocalQueueHistory
extends java.lang.Object

A Local queue history tracks the submission/completion times local Jobs.

The entries of the tracked times are sorted on the Job completion times, not on the Job submission times.

The LocalQueueHistory can be stored to disk by a shutdown hook added to the VM where the managed Peer is running.

Author:
Cyril Briquet

Constructor Summary
LocalQueueHistory(java.lang.String peer_id, boolean store_data)
          Constructs a new LocalQueueHistory.
 
Method Summary
 boolean addJob(long submission_t, long completion_t)
           
 boolean addJobs(java.lang.String jobs_list)
           
 boolean storeJobs()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalQueueHistory

public LocalQueueHistory(java.lang.String peer_id,
                         boolean store_data)
                  throws GridException
Constructs a new LocalQueueHistory.

Parameters:
peer_id - managed Peer id
store_data - if true, the LocalQueueHistory is stored to disk by a shutdown hook added to the VM where the managed Peer is running
Throws:
GridException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addJob

public boolean addJob(long submission_t,
                      long completion_t)
               throws GridException
Returns:
true if data was indeed stored, or false if the Local queue history was configured not to store data
Throws:
GridException

addJobs

public boolean addJobs(java.lang.String jobs_list)
                throws GridException
Returns:
true if data was indeed stored, or false if the Local queue history was configured not to store data
Throws:
GridException

storeJobs

public boolean storeJobs()
Returns:
true if data was indeed stored, or false if the Local queue history was configured not to store/save data

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.