public class QueueNull extends 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 |
---|---|
String |
add(byte[] data)
Add data as byte array to the queue.
|
String |
add(String data)
Add data as a string to the queue.
|
String |
addPath(String path)
Add the given file (identified by its path) to the queue.
|
int |
count()
Return the number of elements in the queue.
|
String |
get(String name)
Not implemented, always throws UnsupportedOperationException.
|
byte[] |
getAsByteArray(String name)
Not implemented, always throws UnsupportedOperationException.
|
String |
getId()
Return the queue id.
|
String |
getPath(String path)
Not implemented, always throws UnsupportedOperationException.
|
Iterator<String> |
iterator()
Iterator over QueueNull implementation.
|
boolean |
lock(String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
lock(String name,
boolean permissive)
Not implemented, always throws UnsupportedOperationException.
|
void |
purge()
Does not do anything.
|
void |
purge(Integer maxLock)
Does not do anything.
|
void |
purge(Integer maxLock,
Integer maxTemp)
Does not do anything.
|
void |
remove(String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
unlock(String name)
Not implemented, always throws UnsupportedOperationException.
|
boolean |
unlock(String name,
boolean permissive)
Not implemented, always throws UnsupportedOperationException.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public QueueNull()
public String getId()
public String add(byte[] data)
public String addPath(String path)
public String get(String name)
get
in interface Queue
name
- the name of the element to be returnedUnsupportedOperationException
- as it does not make sense for a null queue.public byte[] getAsByteArray(String name)
getAsByteArray
in interface Queue
name
- the name of the element to be returnedUnsupportedOperationException
- as it does not make sense for a null queue.public String getPath(String path)
getPath
in interface Queue
path
- the name of the elementUnsupportedOperationException
- as it does not make sense for a null queue.public boolean lock(String name)
lock
in interface Queue
name
- name of the element to be lockedtrue
on success, false
if the element
could not be lockedUnsupportedOperationException
- as it does not make sense for a null queue.public boolean lock(String name, boolean permissive)
lock
in interface Queue
name
- name of the element to be lockedpermissive
- work in permissive modetrue
on success, false
if the element
could not be lockedUnsupportedOperationException
- as it does not make sense for a null queue.public boolean unlock(String name)
unlock
in interface Queue
name
- name of the element to be lockedtrue
on success, false
if the element
could not be unlockedUnsupportedOperationException
- as it does not make sense for a null queue.public boolean unlock(String name, boolean permissive)
unlock
in interface Queue
name
- name of the element to be lockedpermissive
- work in permissive modetrue
on success, false
if the element
could not be unlockedUnsupportedOperationException
- as it does not make sense for a null queue.public void remove(String name)
remove
in interface Queue
name
- name of the element to be removedUnsupportedOperationException
- as it does not make sense for a null queue.public int count()
public void purge(Integer maxLock)
public void purge(Integer maxLock, 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 usedCopyright © 2015. All rights reserved.