diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-09-20 15:22:18 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-09-20 15:22:18 +0200 |
commit | 58c42b2ee9d83f72a896076b3fb6a3a8b13544fd (patch) | |
tree | 8d73bd187011276b491cc916dda5628da9de6af7 /documentapi/src | |
parent | 68d13112bbb3922e2456281cf155b256c8139d40 (diff) |
Cleanup - no functional changes
Diffstat (limited to 'documentapi/src')
-rw-r--r-- | documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java | 124 |
1 files changed, 49 insertions, 75 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java b/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java index 2d6010fce41..d6c3d3ce92f 100644 --- a/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/DocumentAccess.java @@ -11,20 +11,20 @@ import com.yahoo.config.subscription.ConfigSubscriber; * access to documents in a document repository. The document api contains four * separate access types: </p> * - * <ul><li><b>Synchronous random access</b> - provided by {@link SyncSession}, - * allows simple access where throughput is not a concern.</li> + * <ul> + * <li><b>Synchronous random access</b> - provided by {@link SyncSession}, + * allows simple access where throughput is not a concern. * <li><b>Asynchronous random access</b> - provided by {@link AsyncSession}, - * allows document repository writes and random access with high - * throughput.</li> + * allows document repository writes and random access with high throughput. * <li><b>Visiting</b> - provided by {@link 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.</li> + * allows much higher read throughput than random access. * <li><b>Subscription</b> - provided by {@link SubscriptionSession}, allows * changes to a defined set of documents in the repository to be - * visited.</li></ul> + * visited. + * </ul> * - * <p>This class is the factory for creating the four session types mentioned - * above.</p> + * <p>This class is the factory for creating the four session types mentioned above.</p> * * <p>There may be multiple implementations of the document api classes. If * default configuration is sufficient, use the {@link #createDefault} method to @@ -35,8 +35,7 @@ import com.yahoo.config.subscription.ConfigSubscriber; * access types defined in this interface. For example, some document * repositories, like indexes, are <i>write only</i>. Others may support random * access, but not visiting and subscription. Any method which is not supported - * by the underlying implementation will throw - * UnsupportedOperationException.</p> + * by the underlying implementation will throw UnsupportedOperationException.</p> * * <p>Access to this class is thread-safe.</p> * @@ -50,22 +49,22 @@ public abstract class DocumentAccess { private final ConfigSubscriber documentTypeConfigSubscriber; /** - * <p>This is a convenience method to return a document access object with + * This is a convenience method to return a document access object with * all default parameter values. The client that calls this method is also * responsible for shutting the object down when done. If an error occurred * while attempting to create such an object, this method will throw an - * exception.</p> + * exception. * - * @return A running document access object with all default configuration. + * @return a running document access object with all default configuration */ public static DocumentAccess createDefault() { return new com.yahoo.documentapi.messagebus.MessageBusDocumentAccess(); } /** - * <p>Constructs a new document access object.</p> + * Constructs a new document access object. * - * @param params The parameters to use for setup. + * @param params the parameters to use for setup */ protected DocumentAccess(DocumentAccessParams params) { super(); @@ -80,89 +79,70 @@ public abstract class DocumentAccess { } /** - * <p>Returns a session for synchronous document access. Use this for simple - * access.</p> + * Returns a session for synchronous document access. Use this for simple access. * - * @param parameters The parameters of this sync session. - * @return A session to use for synchronous document access. - * @throws UnsupportedOperationException If this access implementation does - * not support synchronous access. - * @throws RuntimeException If an error prevented the session - * from being created. + * @param parameters the parameters of this sync session + * @return a session to use for synchronous document access + * @throws UnsupportedOperationException if this access implementation does not support synchronous access + * @throws RuntimeException if an error prevented the session from being created. */ public abstract SyncSession createSyncSession(SyncParameters parameters); /** - * <p>Returns a session for asynchronous document access. Use this if high - * operation throughput is required.</p> + * Returns a session for asynchronous document access. Use this if high operation throughput is required. * - * @param parameters The parameters of this async session. - * @return A session to use for asynchronous document access. - * @throws UnsupportedOperationException If this access implementation does - * not support asynchronous access. - * @throws RuntimeException If an error prevented the session - * from being created. + * @param parameters the parameters of this async session. + * @return a session to use for asynchronous document access. + * @throws UnsupportedOperationException if this access implementation does not support asynchronous access. + * @throws RuntimeException if an error prevented the session from being created */ public abstract AsyncSession createAsyncSession(AsyncParameters parameters); /** - * <p>Run a visitor with the given visitor parameters, and get the result - * back here.</p> + * Run a visitor with the given visitor parameters, and get the result back here. * * @param parameters The parameters of this visitor session. - * @return A session used to track progress of the visitor and get the - * actual data returned. - * @throws UnsupportedOperationException If this access implementation does - * not support visiting. - * @throws RuntimeException If an error prevented the session - * from being created. - * @throws ParseException If the document selection string - * could not be parsed. + * @return a session used to track progress of the visitor and get the actual data returned. + * @throws UnsupportedOperationException if this access implementation does not support visiting + * @throws RuntimeException if an error prevented the session from being created + * @throws ParseException if the document selection string could not be parsed */ public abstract VisitorSession createVisitorSession(VisitorParameters parameters) throws ParseException; /** - * <p>Creates a destination session for receiving data from visiting. The - * visitor must be started and progress tracked through a visitor - * session.</p> + * Creates a destination session for receiving data from visiting. + * The visitor must be started and progress tracked through a visitor session. * - * @param parameters The parameters of this visitor destination session. - * @return A session used to get the actual data returned. - * @throws UnsupportedOperationException If this access implementation does - * not support visiting. + * @param parameters the parameters of this visitor destination session + * @return a session used to get the actual data returned + * @throws UnsupportedOperationException if this access implementation does not support visiting. */ public abstract VisitorDestinationSession createVisitorDestinationSession(VisitorDestinationParameters parameters); /** - * <p>Creates a subscription and returns a session for getting data from - * it. Use this to get document operations being done by other parties.</p> + * Creates a subscription and returns a session for getting data from it. + * Use this to get document operations being done by other parties. * - * @param parameters The parameters of this subscription session. - * @return A session to use for document subscription. - * @throws UnsupportedOperationException If this access implementation does - * not support subscription. - * @throws RuntimeException If an error prevented the session - * from being created. + * @param parameters The parameters of this subscription session + * @return a session to use for document subscription + * @throws UnsupportedOperationException if this access implementation does not support subscription + * @throws RuntimeException if an error prevented the session from being created */ public abstract SubscriptionSession createSubscription(SubscriptionParameters parameters); /** - * <p>Returns a session for document subscription. Use this to get document - * operations being done by other parties.</p> + * Returns a session for document subscription. Use this to get document operations being done by other parties. * - * @param parameters The parameters of this subscription session. - * @return A session to use for document subscription. - * @throws UnsupportedOperationException If this access implementation does - * not support subscription. - * @throws RuntimeException If an error prevented the session - * from being created. + * @param parameters the parameters of this subscription session + * @return a session to use for document subscription + * @throws UnsupportedOperationException if this access implementation does not support subscription + * @throws RuntimeException if an error prevented the session from being created */ public abstract SubscriptionSession openSubscription(SubscriptionParameters parameters); /** * Shuts down the underlying sessions used by this DocumentAccess; - * subsequent use of this DocumentAccess will throw unspecified exceptions, - * depending on implementation. + * subsequent use of this DocumentAccess will throw unspecified exceptions, depending on implementation. * Classes overriding this must call super.shutdown(). */ public void shutdown() { @@ -170,13 +150,7 @@ public abstract class DocumentAccess { documentTypeConfigSubscriber.close(); } - /** - * <p>Returns the {@link DocumentTypeManager} used by this - * DocumentAccess.</p> - * - * @return The document type manager. - */ - public DocumentTypeManager getDocumentTypeManager() { - return documentTypeManager; - } + /** Returns the {@link DocumentTypeManager} used by this DocumentAccess. */ + public DocumentTypeManager getDocumentTypeManager() { return documentTypeManager; } + } |