public class QueueNull extends java.lang.Object implements Queue
Queue
for general information about
directory queues.Constructor and Description |
---|
QueueNull()
Constructor creating a null directory queue with no parameters.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
add(byte[] data)
Add data as byte array to the queue.
|
java.lang.String |
add(java.lang.String data)
Add data as a string to the queue.
|
java.lang.String |
addPath(java.lang.String path)
Add the given file (identified by its path) to the queue.
|
int |
count()
Return the number of elements in the queue.
|
java.lang.String |
get(java.lang.String name)
Not implemented, always throws UnsupportedOperationException.
|
byte[] |
getAsByteArray(java.lang.String name)
Not implemented, always throws UnsupportedOperationException.
|
java.lang.String |
getId()
Return the queue id.
|
java.lang.String |
getPath(java.lang.String path)
Not implemented, always throws UnsupportedOperationException.
|
java.util.Iterator<java.lang.String> |
iterator()
Iterator over QueueNull implementation.
|
boolean |
lock(java.lang.String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
lock(java.lang.String name,
boolean permissive)
Not implemented, always throws UnsupportedOperationException.
|
void |
purge()
Does not do anything.
|
void |
purge(java.lang.Integer maxLock)
Does not do anything.
|
void |
purge(java.lang.Integer maxLock,
java.lang.Integer maxTemp)
Does not do anything.
|
void |
remove(java.lang.String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
unlock(java.lang.String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
unlock(java.lang.String name,
boolean permissive)
Not implemented, always throws UnsupportedOperationException.
|
public QueueNull()
public java.lang.String getId()
public java.lang.String add(java.lang.String data)
public java.lang.String add(byte[] data)
public java.lang.String addPath(java.lang.String path)
public java.lang.String get(java.lang.String name)
public byte[] getAsByteArray(java.lang.String name)
getAsByteArray
in interface Queue
name
- the name of the element to be returnedjava.lang.UnsupportedOperationException
- as it does not make sense for a null queue.public java.lang.String getPath(java.lang.String path)
public boolean lock(java.lang.String name)
public boolean lock(java.lang.String name, boolean permissive)
public boolean unlock(java.lang.String name)
public boolean unlock(java.lang.String name, boolean permissive)
public void remove(java.lang.String name)
public int count()
public void purge(java.lang.Integer maxLock)
public void purge(java.lang.Integer maxLock, java.lang.Integer maxTemp)
purge
in interface Queue
maxLock
- maximum time for a locked element (in seconds);
if set to 0, locked elements will not be unlocked;
if set to null, the object's default value will be usedmaxTemp
- maximum time for a temporary element (in seconds);
if set to 0, temporary elements will not be removed
if set to null, the object's default value will be usedpublic java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>