E - the type of the entries.@ThreadSafe public class LockOutputShop<E extends Entry> extends DecoratingOutputShop<E,OutputShop<E>>
Lock object provided to its constructor.LockInputShopdelegate| Constructor and Description |
|---|
LockOutputShop(OutputShop<E> output)
Constructs a new concurrent output shop.
|
LockOutputShop(OutputShop<E> output,
Lock lock)
Constructs a new concurrent output shop.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
E |
getEntry(String name)
Returns the entry for the given
name or
null if no entry with this name exists in this container. |
OutputSocket<? extends E> |
getOutputSocket(E entry)
Returns an output socket for writing to the given entry.
|
int |
getSize()
Returns the number of entries in this container.
|
Iterator<E> |
iterator()
Returns a new iterator for all entries in this container.
|
toString@CreatesObligation public LockOutputShop(@WillCloseWhenClosed OutputShop<E> output)
output - the shop to decorate.@CreatesObligation public LockOutputShop(@WillCloseWhenClosed OutputShop<E> output, Lock lock)
output - the shop to decorate.lock - The lock to use.@DischargesObligation
public void close()
throws IOException
close in interface OutputShop<E extends Entry>close in interface Closeableclose in interface AutoCloseableclose in class DecoratingOutputShop<E extends Entry,OutputShop<E extends Entry>>IOException@CheckForNull public E getEntry(String name)
EntryContainername or
null if no entry with this name exists in this container.getEntry in interface EntryContainer<E extends Entry>getEntry in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>name - an entry name.name or
null if no entry with this name exists in this container.public OutputSocket<? extends E> getOutputSocket(E entry)
OutputServicegetOutputSocket in interface OutputService<E extends Entry>getOutputSocket in class DecoratingOutputShop<E extends Entry,OutputShop<E extends Entry>>entry - the entry, which will be the
local target of the returned
output socket.public int getSize()
EntryContainergetSize in interface EntryContainer<E extends Entry>getSize in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>public Iterator<E> iterator()
EntryContainerFirst, the iteration must be consistent: Multiple iterators must iterate the same entries in the same order again unless the set of entries has changed.
Next, the iteration should also reflect the natural order of the entries in this container. For example, if this container represents an archive file, the iteration should reflect the natural order of the entries in the archive file.
iterator in interface EntryContainer<E extends Entry>iterator in interface OutputService<E extends Entry>iterator in interface Iterable<E extends Entry>iterator in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.