Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Javadocs] add to o.o.transport #3220

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/**
* An exception indicating that a transport action was not found.
*
*
* @opensearch.internal
*/
public class ActionNotFoundTransportException extends TransportException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* An action invocation failure.
*
*
* @opensearch.internal
*/
public class ActionTransportException extends TransportException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@

import java.io.IOException;

/**
* A transport binding failure.
*
* @opensearch.internal
*/
public class BindTransportException extends TransportException {

public BindTransportException(StreamInput in) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
/**
* A specialized, bytes only request, that can potentially be optimized on the network
* layer, specifically for the same large buffer send to several nodes.
*
* @opensearch.internal
*/
public class BytesTransportRequest extends TransportRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

/**
* Abstract Transport.Connection that provides common close logic.
*
* @opensearch.internal
*/
public abstract class CloseableConnection implements Transport.Connection {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
* This class manages node connections within a cluster. The connection is opened by the underlying transport.
* Once the connection is opened, this class manages the connection. This includes closing the connection when
* the connection manager is closed.
*
* @opensearch.internal
*/
public class ClusterConnectionManager implements ConnectionManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
*
* {@link CompressibleBytesOutputStream#close()} will NOT close the underlying stream. The byte stream passed
* in the constructor must be closed individually.
*
* @opensearch.internal
*/
final class CompressibleBytesOutputStream extends StreamOutput {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

import java.io.IOException;

/**
* Transport connection exception
*
* @opensearch.internal
*/
public class ConnectTransportException extends ActionTransportException {

private final DiscoveryNode node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;

/**
* Transport connection manager.
*
* @opensearch.internal
*/
public interface ConnectionManager extends Closeable {

void addListener(TransportConnectionListener listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
/**
* A connection profile describes how many connection are established to specific node for each of the available request types.
* ({@link org.opensearch.transport.TransportRequestOptions.Type}). This allows to tailor a connection towards a specific usage.
*
* @opensearch.internal
*/
public final class ConnectionProfile {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
import org.opensearch.common.io.stream.StreamInput;
import org.opensearch.threadpool.ThreadPool;

/**
* Handler for empty transport response
*
* @opensearch.internal
*/
public class EmptyTransportResponseHandler implements TransportResponseHandler<TransportResponse.Empty> {

public static final EmptyTransportResponseHandler INSTANCE_SAME = new EmptyTransportResponseHandler(ThreadPool.Names.SAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

/**
* A response handler to be used when all interaction will be done through the {@link TransportFuture}.
*
* @opensearch.internal
*/
public abstract class FutureTransportResponseHandler<T extends TransportResponse> implements TransportResponseHandler<T> {

Expand Down
5 changes: 5 additions & 0 deletions server/src/main/java/org/opensearch/transport/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
import java.util.Set;
import java.util.TreeSet;

/**
* Transport Header
*
* @opensearch.internal
*/
public class Header {

private static final String RESPONSE_NAME = "NO_ACTION_NAME_FOR_RESPONSES";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
import java.util.function.Predicate;
import java.util.function.Supplier;

/**
* Aggregates inbound data
*
* @opensearch.internal
*/
public class InboundAggregator implements Releasable {

private final Supplier<CircuitBreaker> circuitBreaker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
import java.io.IOException;
import java.util.function.Consumer;

/**
* Decodes inbound data off the wire
*
* @opensearch.internal
*/
public class InboundDecoder implements Releasable {

static final Object PING = new Object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;

/**
* Handler for inbound data
*
* @opensearch.internal
*/
public class InboundHandler {

private static final Logger logger = LogManager.getLogger(InboundHandler.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@

import java.io.IOException;

/**
* Inbound data as a message
*
* @opensearch.internal
*/
public class InboundMessage implements Releasable {

private final Header header;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
import java.util.function.LongSupplier;
import java.util.function.Supplier;

/**
* Pipeline for receiving inbound messages
*
* @opensearch.internal
*/
public class InboundPipeline implements Releasable {

private static final ThreadLocal<ArrayList<Object>> fragmentList = ThreadLocal.withInitial(ArrayList::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
/**
* Represents a transport message sent over the network. Subclasses implement serialization and
* deserialization.
*
* @opensearch.internal
*/
public abstract class NetworkMessage {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

/**
* Thrown after failed to connect to all seed nodes of the remote cluster.
*
* @opensearch.internal
*/
public class NoSeedNodeLeftException extends OpenSearchException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
/**
* An exception that remote cluster is missing or
* connectivity to the remote connection is failing
*
* @opensearch.internal
*/
public final class NoSuchRemoteClusterException extends ResourceNotFoundException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

import java.io.IOException;

/**
* Exception thrown if a node disconnects
*
* @opensearch.internal
*/
public class NodeDisconnectedException extends ConnectTransportException {

public NodeDisconnectedException(DiscoveryNode node, String action) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/**
* An exception indicating that a message is sent to a node that is not connected.
*
*
* @opensearch.internal
*/
public class NodeNotConnectedException extends ConnectTransportException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

import java.io.IOException;

/**
* Exception thrown if a node should not disconnect
*
* @opensearch.internal
*/
public class NodeShouldNotConnectException extends NodeNotConnectedException {

public NodeShouldNotConnectException(DiscoveryNode fromNode, DiscoveryNode node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@

import java.io.IOException;

/**
* Exception thrown if data is not serializable
*
* @opensearch.internal
*/
public class NotSerializableTransportException extends TransportException {

public NotSerializableTransportException(Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
import java.io.IOException;
import java.util.Set;

/**
* Outbound data handler
*
* @opensearch.internal
*/
final class OutboundHandler {

private static final Logger logger = LogManager.getLogger(OutboundHandler.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
import java.io.IOException;
import java.util.Set;

/**
* Outbound data as a message
*
* @opensearch.internal
*/
abstract class OutboundMessage extends NetworkMessage {

private final Writeable message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

/**
* Future for transporting data
*
* @opensearch.internal
*/
public class PlainTransportFuture<V extends TransportResponse> extends BaseFuture<V>
implements
TransportFuture<V>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@

import static org.opensearch.common.settings.Setting.intSetting;

/**
* Connect through a proxy
*
* @opensearch.internal
*/
public class ProxyConnectionStrategy extends RemoteConnectionStrategy {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

import java.io.IOException;

/**
* Thrown when receiving a timeout
*
* @opensearch.internal
*/
public class ReceiveTimeoutTransportException extends ActionTransportException {

public ReceiveTimeoutTransportException(DiscoveryNode node, String action, String msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

/**
* Base class for all services and components that need up-to-date information about the registered remote clusters
*
* @opensearch.internal
*/
public abstract class RemoteClusterAware {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
import org.opensearch.common.settings.Settings;
import org.opensearch.threadpool.ThreadPool;

/**
* Client that is aware of remote clusters
*
* @opensearch.internal
*/
final class RemoteClusterAwareClient extends AbstractClient {

private final TransportService service;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@

import org.opensearch.cluster.node.DiscoveryNode;

/**
* Request for remote clusters
*
* @opensearch.internal
*/
public interface RemoteClusterAwareRequest {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
* In the case of a disconnection, this class will issue a re-connect task to establish at most
* {@link SniffConnectionStrategy#REMOTE_CONNECTIONS_PER_CLUSTER} until either all eligible nodes are exhausted or the maximum number of
* connections per cluster has been reached.
*
* @opensearch.internal
*/
final class RemoteClusterConnection implements Closeable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@

/**
* Basic service for accessing remote clusters via gateway nodes
*
* @opensearch.internal
*/
public final class RemoteClusterService extends RemoteClusterAware implements Closeable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
/**
* This class encapsulates all remote cluster information to be rendered on
* {@code _remote/info} requests.
*
* @opensearch.internal
*/
public final class RemoteConnectionInfo implements ToXContentFragment, Writeable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;

/**
* Manager for connecting to remote nodes
*
* @opensearch.internal
*/
public class RemoteConnectionManager implements ConnectionManager {

private final String clusterAlias;
Expand Down
Loading