Skip to content

Commit

Permalink
docs: fix javadoc warnings/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
npepinpe committed Nov 10, 2021
1 parent daf4740 commit e7ceebe
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* <li>the ready check is successful (see {@link #newDefaultBrokerReadyCheck()})
* </ul>
*
* <h3>Connecting to other nodes</h3>
* <h2>Connecting to other nodes</h2>
*
* <p>If you want to connect this broker to other nodes, the recommended way is to create a new
* network (e.g. {@link Network#newNetwork()}) and set it as the network of each container you wish
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/zeebe/containers/ZeebeContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public ZeebeContainer withoutTopologyCheck() {
return waitingFor(newDefaultWaitStrategy());
}

/** @return the default wait strategy for this container */
protected WaitAllStrategy newDefaultWaitStrategy() {
return new WaitAllStrategy(Mode.WITH_OUTER_TIMEOUT)
.withStrategy(new HostPortWaitStrategy())
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/io/zeebe/containers/ZeebeData.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@
import org.apiguardian.api.API.Status;
import org.testcontainers.containers.GenericContainer;

/**
* Represents any type of data container which will hold the Zeebe data (i.e. logs and snapshots)
*/
@API(status = Status.EXPERIMENTAL)
@FunctionalInterface
public interface ZeebeData {

/**
* Attaches the data to the given container.
*
* @param container the container to attach to
* @param <T> the type of the container
*/
<T extends GenericContainer<T> & ZeebeBrokerNode<T>> void attach(final T container);
}
9 changes: 7 additions & 2 deletions src/main/java/io/zeebe/containers/ZeebeGatewayContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* <li>the topology check is successful (see {@link #newDefaultTopologyCheck()}
* </ul>
*
* <h3>Connecting to brokers</h3>
* <h2>Connecting to brokers</h2>
*
* <p>If you want to connect this gateway to other nodes, the recommended way is to create a new
* network (e.g. {@link Network#newNetwork()}) and set it as the network of each container you wish
Expand All @@ -50,7 +50,7 @@
* contactPoint} to the broker's address; if it is a {@link ZeebeNode} you can use {@link
* ZeebeNode#getInternalClusterAddress()}.
*
* <h3>Accessing the gateway</h3>
* <h2>Accessing the gateway</h2>
*
* <p>Once started, you can build a new client for it e.g.:
*
Expand Down Expand Up @@ -81,6 +81,11 @@ public ZeebeGatewayContainer() {
this(ZeebeDefaults.getInstance().getDefaultDockerImage());
}

/**
* Creates a new container using the given image.
*
* @param dockerImageName the base image for the container
*/
public ZeebeGatewayContainer(final DockerImageName dockerImageName) {
super(dockerImageName);
applyDefaultConfiguration();
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/io/zeebe/containers/ZeebeHostData.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
public class ZeebeHostData implements ZeebeData {
private final String hostPath;

/**
* Creates a new {@link ZeebeHostData} which points to the given host path.
*
* @param hostPath the path where the data will be stored on the host
*/
public ZeebeHostData(final String hostPath) {
this.hostPath = hostPath;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/io/zeebe/containers/ZeebePort.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@
/** Represents the list of known port in a Zeebe cluster, all node types included. */
@API(status = Status.STABLE)
public enum ZeebePort {
/** Port of the command API, i.e. the port used by the gateway to communicate with the broker */
COMMAND(26501),
/** Port of the gateway API, i.e. the port used by the client to communicate with any gateway */
GATEWAY(26500),
/** Port for internal communication, i.e. what all nodes use to communicate for clustering */
INTERNAL(26502),
/** Port for the management server, i.e. actuators, metrics, etc. */
MONITORING(9600);

private final int port;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/zeebe/containers/archive/TarExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/** A utility class which can take an input stream and extract */
@API(status = Status.INTERNAL)
public final class TarExtractor {

/** Singleton instance of this utility class */
public static final TarExtractor INSTANCE = new TarExtractor();

/**
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/io/zeebe/containers/cluster/ZeebeCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ public class ZeebeCluster implements Startable {
private final int replicationFactor;
private final int partitionsCount;

/**
* Creates a new cluster from the given parameters.
*
* @param network the network attached to each node
* @param name the name of the cluster (should also be configured on the nodes)
* @param gateways the set of gateway nodes, identified by their member ID
* @param brokers the set of broker nodes, identified by their node ID
* @param replicationFactor the replication factor of the cluster
* @param partitionsCount the number of partitions in the cluster
*/
public ZeebeCluster(
final Network network,
final String name,
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/io/zeebe/containers/util/RemoteDebugger.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@
*/
@API(status = Status.EXPERIMENTAL)
public final class RemoteDebugger {

/** The default binding port for the remote debugger server */
public static final int DEFAULT_REMOTE_DEBUGGER_PORT = 5005;

/** The default timeout that will be applied to the container being debugged */
public static final Duration DEFAULT_START_TIMEOUT = Duration.ofMinutes(5);

private RemoteDebugger() {}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/io/zeebe/containers/util/TinyContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
public final class TinyContainer extends GenericContainer<TinyContainer> {
private static final DockerImageName IMAGE = DockerImageName.parse("alpine:3.14.2");

/** Configures a new container using an Alpine based image */
public TinyContainer() {
super(IMAGE);
}
Expand Down

0 comments on commit e7ceebe

Please sign in to comment.