This is the starting point of the document api. This api provides
access to documents in a document repository. The document api contains four
separate access types:
- Synchronous random access - provided by
SyncSession,
allows simple access where throughput is not a concern.
- Asynchronous random access - provided by
AsyncSession,
allows document repository writes and random access with high
throughput.
- Visiting - provided by
VisitorSession, allows a set of
documents to be accessed in an order decided by the document repository. This
allows much higher read throughput than random access.
- Subscription - provided by
SubscriptionSession, allows
changes to a defined set of documents in the repository to be
visited.
This class is the factory for creating the four session types mentioned
above.
There may be multiple implementations of the document api classes. If
default configuration is sufficient, use the
#createDefault method to
return a running document access. Note that there are running threads within
an access object, so you must shut it down when done.
An implementation of the Document Api may support just a subset of the
access types defined in this interface. For example, some document
repositories, like indexes, are write only. Others may support random
access, but not visiting and subscription. Any method which is not supported
by the underlying implementation will throw
UnsupportedOperationException.
Access to this class is thread-safe.