From 58c42b2ee9d83f72a896076b3fb6a3a8b13544fd Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Fri, 20 Sep 2019 15:22:18 +0200 Subject: Cleanup - no functional changes --- .../java/com/yahoo/documentapi/DocumentAccess.java | 124 ++++++++------------- 1 file changed, 49 insertions(+), 75 deletions(-) (limited to 'documentapi/src') 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:

* - * * - *

This class is the factory for creating the four session types mentioned - * above.

+ *

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 {@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 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.

+ * by the underlying implementation will throw UnsupportedOperationException.

* *

Access to this class is thread-safe.

* @@ -50,22 +49,22 @@ public abstract class DocumentAccess { private final ConfigSubscriber documentTypeConfigSubscriber; /** - *

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.

+ * 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(); } /** - *

Constructs a new document access object.

+ * 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 { } /** - *

Returns a session for synchronous document access. Use this for simple - * access.

+ * 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); /** - *

Returns a session for asynchronous document access. Use this if high - * operation throughput is required.

+ * 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); /** - *

Run a visitor with the given visitor parameters, and get the result - * back here.

+ * 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; /** - *

Creates a destination session for receiving data from visiting. The - * visitor must be started and progress tracked through a visitor - * session.

+ * 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); /** - *

Creates a subscription and returns a session for getting data from - * it. Use this to get document operations being done by other parties.

+ * 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); /** - *

Returns a session for document subscription. Use this to get document - * operations being done by other parties.

+ * 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(); } - /** - *

Returns the {@link DocumentTypeManager} used by this - * DocumentAccess.

- * - * @return The document type manager. - */ - public DocumentTypeManager getDocumentTypeManager() { - return documentTypeManager; - } + /** Returns the {@link DocumentTypeManager} used by this DocumentAccess. */ + public DocumentTypeManager getDocumentTypeManager() { return documentTypeManager; } + } -- cgit v1.2.3