E
- the type of the entries.@ThreadSafe public class LockInputShop<E extends Entry> extends DecoratingInputShop<E,InputShop<E>>
Lock
object provided to its constructor.LockOutputShop
delegate
Constructor and Description |
---|
LockInputShop(InputShop<E> input)
Constructs a new concurrent input shop.
|
LockInputShop(InputShop<E> input,
Lock lock)
Constructs a new concurrent input 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. |
InputSocket<? extends E> |
getInputSocket(String name)
Returns an input socket for reading from the entry with the given name.
|
int |
getSize()
Returns the number of entries in this container.
|
Iterator<E> |
iterator()
Returns a new iterator for all entries in this container.
|
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
@CreatesObligation public LockInputShop(@WillCloseWhenClosed InputShop<E> input)
input
- the shop to decorate.@CreatesObligation public LockInputShop(@WillCloseWhenClosed InputShop<E> input, Lock lock)
input
- the shop to decorate.lock
- The lock to use.@DischargesObligation public void close() throws IOException
@CheckForNull public E getEntry(String name)
EntryContainer
name
or
null
if no entry with this name exists in this container.public InputSocket<? extends E> getInputSocket(String name)
InputService
getInputSocket
in interface InputService<E extends Entry>
getInputSocket
in class DecoratingInputShop<E extends Entry,InputShop<E extends Entry>>
name
- an entry name
.public int getSize()
EntryContainer
public Iterator<E> iterator()
EntryContainer
First, 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 InputService<E extends Entry>
iterator
in interface Iterable<E extends Entry>
iterator
in class DecoratingEntryContainer<E extends Entry,InputShop<E extends Entry>>
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.