com.voidsearch.voidbase.storage.queuetree
Class QueueTreeStorage
java.lang.Object
com.voidsearch.voidbase.storage.queuetree.QueueTreeStorage
- All Implemented Interfaces:
- SupervisedStorage
public class QueueTreeStorage
- extends java.lang.Object
- implements SupervisedStorage
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.slf4j.Logger logger
singleton
protected static QueueTreeStorage singleton
QueueTreeStorage
protected QueueTreeStorage()
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
factory
public static QueueTreeStorage factory()
createQueue
public void createQueue(java.lang.String queueName,
int size)
throws QueueAlreadyExistsException,
SupervisionException
- Throws:
QueueAlreadyExistsException
SupervisionException
resizeQueue
public void resizeQueue(java.lang.String queueName,
int size)
throws InvalidQueueException,
SupervisionException
- Throws:
InvalidQueueException
SupervisionException
queueExists
public boolean queueExists(java.lang.String name)
throws SupervisionException
- Throws:
SupervisionException
deleteQueue
public void deleteQueue(java.lang.String queueName)
throws InvalidQueueException,
SupervisionException
- Throws:
InvalidQueueException
SupervisionException
deleteAll
public void deleteAll()
throws SupervisionException
- Throws:
SupervisionException
flushQueue
public void flushQueue(java.lang.String queueName)
throws SupervisionException
- Throws:
SupervisionException
flushAll
public void flushAll()
throws SupervisionException
- Throws:
SupervisionException
getMetadataMap
public java.util.LinkedHashMap<java.lang.String,java.lang.Object> getMetadataMap(java.lang.String queueName)
putFIFO
public void putFIFO(java.lang.String queueName,
java.lang.Object value)
throws InvalidQueueException,
SupervisionException
- Throws:
InvalidQueueException
SupervisionException
getFIFO
public java.util.List getFIFO(java.lang.String queueName,
int count)
throws InvalidQueueException,
SupervisionException
- Throws:
InvalidQueueException
SupervisionException
getFIFO
public java.util.List getFIFO(java.lang.String queueName,
int count,
long timestamp)
throws InvalidQueueException,
SupervisionException
- Throws:
InvalidQueueException
SupervisionException
listQueues
public java.util.LinkedList listQueues()
throws SupervisionException
- Throws:
SupervisionException
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
updateQueryCounters
public void updateQueryCounters()
updateQueryCounters
public void updateQueryCounters(StorageOperation op)
getSize
public long getSize()
getTotalEntries
public long getTotalEntries()
getTotalQueries
public long getTotalQueries()
- Specified by:
getTotalQueries in interface SupervisedStorage
incrementMemorySize
public void incrementMemorySize(java.lang.Object obj)
decrementMemorySize
public void decrementMemorySize(java.lang.Object obj)
getMemorySize
public static long getMemorySize(java.lang.Object obj)
getMemorySize
public long getMemorySize()
- Specified by:
getMemorySize in interface SupervisedStorage
Copyright © 2009. All Rights Reserved.