public class MemoryTrustedLocator extends TrustedLocator
ILocator controls manipulation of its data resource simply by
copying it completely to memory. All I/O is done through the in memory
buffer. When it comes to writing the data, the buffer is always completely
written back.
This locator acts on a "committed read" concurrency strategy. If an output stream or random access is open, other clients requesting stream will always see the old state until the output stream or random access will flush. From now the changes are visible to NEW stream, but still not to the old ones.
| Constructor and Description |
|---|
MemoryTrustedLocator(TrustedLocatorFactory factory,
ILocator wrapped) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Return an
InputStream on the data represented by the receiver. |
OutputStream |
getOutputStream()
Return an
OutputStream on the location represented by the
receiver. |
IRandomAccess |
getRandomAccess()
The
IRandomAccess for this. |
String |
toString() |
checkpoint, delete, ensureEqual, equals, exists, getAdapter, getChild, getException, getFactory, getFullName, getLength, getLocalName, getParent, getReader, getReader, getType, getTypedName, getWrapped, getWriter, getWriter, hashCode, isDirectory, isOutOfSynch, isReadOnly, listLocators, rename, setReadOnly, synch, toURLpublic MemoryTrustedLocator(TrustedLocatorFactory factory, ILocator wrapped)
public InputStream getInputStream() throws IOException
ILocatorInputStream on the data represented by the receiver.InputStream on the data represented by the receiver.IOExceptionpublic OutputStream getOutputStream() throws IOException
ILocatorOutputStream on the location represented by the
receiver.OutputStream on the location represented by the
receiver.IOExceptionpublic IRandomAccess getRandomAccess() throws IOException
ILocatorIRandomAccess for this.IRandomAccess for this.IOExceptionCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.