com.voidsearch.voidbase.storage.jobqueue
Class JobQueue

java.lang.Object
  extended by com.voidsearch.voidbase.storage.jobqueue.JobQueue
All Implemented Interfaces:
AsynchronousStorage, SupervisedStorage, java.lang.Runnable

public class JobQueue
extends java.lang.Object
implements AsynchronousStorage, SupervisedStorage, java.lang.Runnable


Nested Class Summary
 class JobQueue.RequestExecutor
           
 
Constructor Summary
JobQueue()
           
 
Method Summary
 void addDone(JobRequest request, JobResult result)
           
 void blockOperation(StorageOperation op)
           
 void enableOperation(StorageOperation op)
           
 JobResult get(JobRequest req)
           
 long getMemorySize()
           
 long getTotalQueries()
           
 JobRequest poll()
           
 void put(JobRequest req)
           
 void registerDequeuer()
           
 void run()
           
 void updateStats(StorageStats stats)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobQueue

public JobQueue()
Method Detail

registerDequeuer

public void registerDequeuer()
Specified by:
registerDequeuer in interface AsynchronousStorage

put

public void put(JobRequest req)
         throws SupervisionException
Throws:
SupervisionException

get

public JobResult get(JobRequest req)
              throws SupervisionException
Throws:
SupervisionException

poll

public JobRequest poll()
                throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

addDone

public void addDone(JobRequest request,
                    JobResult result)

blockOperation

public void blockOperation(StorageOperation op)
                    throws SupervisionException
Specified by:
blockOperation in interface SupervisedStorage
Throws:
SupervisionException

enableOperation

public void enableOperation(StorageOperation op)
                     throws SupervisionException
Specified by:
enableOperation in interface SupervisedStorage
Throws:
SupervisionException

updateStats

public void updateStats(StorageStats stats)
Specified by:
updateStats in interface SupervisedStorage

getTotalQueries

public long getTotalQueries()
Specified by:
getTotalQueries in interface SupervisedStorage

getMemorySize

public long getMemorySize()
Specified by:
getMemorySize in interface SupervisedStorage

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2009. All Rights Reserved.