diff --git a/aeron-agent/src/main/java/io/aeron/agent/ArchiveEventLogger.java b/aeron-agent/src/main/java/io/aeron/agent/ArchiveEventLogger.java index 0f43a74a2e..bcdea08ac6 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/ArchiveEventLogger.java +++ b/aeron-agent/src/main/java/io/aeron/agent/ArchiveEventLogger.java @@ -106,7 +106,7 @@ public void logRecordingSignal(final DirectBuffer buffer, final int offset, fina } /** - * Log a state change event for an archive replay session + * Log a state change event for an archive replay session. * * @param type representing the state change. * @param oldState before the change. @@ -114,8 +114,8 @@ public void logRecordingSignal(final DirectBuffer buffer, final int offset, fina * @param sessionId identity for the replay session on the Archive. * @param recordingId recording id on the Archive. * @param position position of state change ({@link io.aeron.archive.client.AeronArchive#NULL_POSITION} - * if not relevant) - * @param reason a string indicating the reason for the state change + * if not relevant). + * @param reason a string indicating the reason for the state change. */ public > void logReplaySessionStateChange( final E oldState, @@ -155,15 +155,15 @@ public > void logReplaySessionStateChange( } /** - * Log a state change event for an archive recording session + * Log a state change event for an archive recording session. * * @param type representing the state change. * @param oldState before the change. * @param newState after the change. * @param recordingId recording id on the Archive. * @param position position of state change ({@link io.aeron.archive.client.AeronArchive#NULL_POSITION} - * if not relevant) - * @param reason a string indicating the reason for the state change + * if not relevant). + * @param reason a string indicating the reason for the state change. */ public > void logRecordingSessionStateChange( final E oldState, @@ -201,7 +201,7 @@ public > void logRecordingSessionStateChange( } /** - * Log a state change event for an archive replication session + * Log a state change event for an archive replication session. * * @param type representing the state change. * @param oldState before the change. @@ -210,8 +210,8 @@ public > void logRecordingSessionStateChange( * @param srcRecordingId source recording id on the Archive. * @param dstRecordingId destination recording id on the Archive. * @param position position of state change ({@link io.aeron.archive.client.AeronArchive#NULL_POSITION} - * if not relevant) - * @param reason a string indicating the reason for the state change + * if not relevant). + * @param reason a string indicating the reason for the state change. */ public > void logReplicationSessionStateChange( final E oldState, @@ -253,7 +253,7 @@ public > void logReplicationSessionStateChange( } /** - * Log a state change event for an archive control session + * Log a state change event for an archive control session. * * @param type representing the state change. * @param oldState before the change. diff --git a/aeron-agent/src/main/java/io/aeron/agent/ClusterEventCode.java b/aeron-agent/src/main/java/io/aeron/agent/ClusterEventCode.java index 8fe3fb4073..44176ca2dc 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/ClusterEventCode.java +++ b/aeron-agent/src/main/java/io/aeron/agent/ClusterEventCode.java @@ -59,12 +59,12 @@ public enum ClusterEventCode implements EventCode REQUEST_VOTE(6, ClusterEventDissector::dissectRequestVote), /** - * Notification of a follower's catchup position + * Notification of a follower's catchup position. */ CATCHUP_POSITION(7, ClusterEventDissector::dissectCatchupPosition), /** - * A request to stop follower catchup + * A request to stop follower catchup. */ STOP_CATCHUP(8, ClusterEventDissector::dissectStopCatchup), @@ -74,47 +74,47 @@ public enum ClusterEventCode implements EventCode TRUNCATE_LOG_ENTRY(9, ClusterEventDissector::dissectTruncateLogEntry), /** - * Event when a new leadership term is replayed + * Event when a new leadership term is replayed. */ REPLAY_NEW_LEADERSHIP_TERM(10, ClusterEventDissector::dissectReplayNewLeadershipTerm), /** - * Event when an append position is received + * Event when an append position is received. */ APPEND_POSITION(11, ClusterEventDissector::dissectAppendPosition), /** - * Event when a commit position is received + * Event when a commit position is received. */ COMMIT_POSITION(12, ClusterEventDissector::dissectCommitPosition), /** - * Event when an event to add a new passive member is received + * Event when an event to add a new passive member is received. */ ADD_PASSIVE_MEMBER(13, ClusterEventDissector::dissectAddPassiveMember), /** - * Event when a session is closed + * Event when a session is closed. */ APPEND_SESSION_CLOSE(14, ClusterEventDissector::dissectAppendCloseSession), /** - * Event when the DynamicJoin changes state (Unused) + * Event when the DynamicJoin changes state (Unused). */ DYNAMIC_JOIN_STATE_CHANGE_UNUSED(15, ClusterEventDissector::dissectNoOp), /** - * Event when the ClusterBackup changes state + * Event when the ClusterBackup changes state. */ CLUSTER_BACKUP_STATE_CHANGE(16, ClusterEventDissector::dissectStateChange), /** - * Event when a node is instructed to terminate + * Event when a node is instructed to terminate. */ TERMINATION_POSITION(17, ClusterEventDissector::dissectTerminationPosition), /** - * Event when a node acks the termination request + * Event when a node acks the termination request. */ TERMINATION_ACK(18, ClusterEventDissector::dissectTerminationAck), @@ -129,7 +129,7 @@ public enum ClusterEventCode implements EventCode REPLICATION_ENDED(20, ClusterEventDissector::dissectReplicationEnded), /** - * Event when a standby snapshot notification has been received by a consensus module + * Event when a standby snapshot notification has been received by a consensus module. */ STANDBY_SNAPSHOT_NOTIFICATION(21, ClusterEventDissector::dissectStandbySnapshotNotification), diff --git a/aeron-agent/src/main/java/io/aeron/agent/ClusterEventLogger.java b/aeron-agent/src/main/java/io/aeron/agent/ClusterEventLogger.java index 462d7fc883..7af4d53a4a 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/ClusterEventLogger.java +++ b/aeron-agent/src/main/java/io/aeron/agent/ClusterEventLogger.java @@ -315,7 +315,7 @@ public void logOnRequestVote( } /** - * Log the catchup position message + * Log the catchup position message. * * @param memberId of the current cluster node. * @param leadershipTermId leadership term to catch up on @@ -359,7 +359,7 @@ public void logOnCatchupPosition( } /** - * Log the stop catchup message + * Log the stop catchup message. * * @param memberId of the current cluster node. * @param leadershipTermId current leadershipTermId. @@ -593,8 +593,8 @@ public void logOnCommitPosition( * Log addition of a passive member to the cluster. * * @param memberId of the current cluster node. - * @param correlationId correlationId for responding to the addition of the passive member - * @param memberEndpoints the endpoints for the new member + * @param correlationId correlationId for responding to the addition of the passive member. + * @param memberEndpoints the endpoints for the new member. */ public void logOnAddPassiveMember(final int memberId, final long correlationId, final String memberEndpoints) { @@ -627,12 +627,12 @@ public void logOnAddPassiveMember(final int memberId, final long correlationId, /** * Log the appending of a session close event to the log. * - * @param memberId member (leader) publishing the event - * @param sessionId session id of the session be closed - * @param closeReason reason to close the session - * @param leadershipTermId current leadership term id - * @param timestamp the current timestamp - * @param timeUnit units for the timestamp + * @param memberId member (leader) publishing the event. + * @param sessionId session id of the session be closed. + * @param closeReason reason to close the session. + * @param leadershipTermId current leadership term id. + * @param timestamp the current timestamp. + * @param timeUnit units for the timestamp. */ public void logAppendSessionClose( final int memberId, diff --git a/aeron-agent/src/main/java/io/aeron/agent/DriverEventCode.java b/aeron-agent/src/main/java/io/aeron/agent/DriverEventCode.java index 0e1af12356..2bc83a3c01 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/DriverEventCode.java +++ b/aeron-agent/src/main/java/io/aeron/agent/DriverEventCode.java @@ -118,7 +118,7 @@ public enum DriverEventCode implements EventCode */ CMD_OUT_EXCLUSIVE_PUBLICATION_READY(33, DriverEventDissector::dissectCommand), /** - * Error response + * Error response. */ CMD_OUT_ERROR(34, DriverEventDissector::dissectCommand), /** @@ -213,7 +213,7 @@ public enum DriverEventCode implements EventCode (code, buffer, offset, builder) -> DriverEventDissector.dissectResend(buffer, offset, builder)), /** - * Remove destination by id + * Remove destination by id. */ CMD_IN_REMOVE_DESTINATION_BY_ID(56, DriverEventDissector::dissectCommand), diff --git a/aeron-agent/src/main/java/io/aeron/agent/DriverEventLogger.java b/aeron-agent/src/main/java/io/aeron/agent/DriverEventLogger.java index 2a3a1729e5..3c2627bce7 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/DriverEventLogger.java +++ b/aeron-agent/src/main/java/io/aeron/agent/DriverEventLogger.java @@ -49,7 +49,7 @@ public final class DriverEventLogger public static final int MAX_HOST_NAME_LENGTH = 256; /** - * Maximum length of a Channel URI + * Maximum length of a Channel URI. */ public static final int MAX_CHANNEL_URI_LENGTH = 4096; @@ -390,9 +390,9 @@ public void logResolve( * * @param resolverName simple class name of the resolver * @param durationNs of the call in nanoseconds. - * @param name host name being resolved - * @param isReLookup address that was resolved to, can be null - * @param resolvedName address that was resolved to, can be null + * @param name host name being resolved. + * @param isReLookup address that was resolved to, can be null. + * @param resolvedName address that was resolved to, can be null. */ public void logLookup( final String resolverName, diff --git a/aeron-agent/src/main/java/io/aeron/agent/EventCodeType.java b/aeron-agent/src/main/java/io/aeron/agent/EventCodeType.java index 9cac6d3bd8..796dc2b1f6 100644 --- a/aeron-agent/src/main/java/io/aeron/agent/EventCodeType.java +++ b/aeron-agent/src/main/java/io/aeron/agent/EventCodeType.java @@ -36,7 +36,7 @@ enum EventCodeType CLUSTER(2), /** - * Events related to cluster standby operations including standby consensus and transitioning + * Events related to cluster standby operations including standby consensus and transitioning. */ STANDBY(3), diff --git a/aeron-annotations/src/main/java/io/aeron/config/Config.java b/aeron-annotations/src/main/java/io/aeron/config/Config.java index 19a4e2af57..23e8cfeb92 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/Config.java +++ b/aeron-annotations/src/main/java/io/aeron/config/Config.java @@ -19,14 +19,14 @@ import java.util.concurrent.TimeUnit; /** - * Annotation to indicate this is a config option + * Annotation to indicate this is a config option. */ @Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.SOURCE) public @interface Config { /** - * Type is used to indicate whether the annotation is marking a property name or a default value + * Type is used to indicate whether the annotation is marking a property name or a default value. */ enum Type { @@ -45,82 +45,82 @@ enum Type } /** - * @return what type of field is being annotated + * @return what type of field is being annotated. */ Type configType() default Type.UNDEFINED; /** - * @return the unique id that ties together all the usages of the annotation across fields/methods + * @return the unique id that ties together all the usages of the annotation across fields/methods. */ String id() default ""; /** - * @return the uri parameter (if any) associated with this option + * @return the uri parameter (if any) associated with this option. */ String uriParam() default ""; /** - * @return whether or not this config option exists in the C code + * @return whether this config option exists in the C code. */ boolean existsInC() default true; /** - * @return the expected C #define name that will be set with the env variable name for this option + * @return the expected C #define name that will be set with the env variable name for this option. */ String expectedCEnvVarFieldName() default ""; /** - * @return the expected C env variable name for this option + * @return the expected C env variable name for this option. */ String expectedCEnvVar() default ""; /** - * @return the expected C #define name that will be set with the default value for this option + * @return the expected C #define name that will be set with the default value for this option. */ String expectedCDefaultFieldName() default ""; /** - * @return the expected C default value for this option + * @return the expected C default value for this option. */ String expectedCDefault() default ""; /** - * @return whether to skip validation of the default in C + * @return whether to skip validation of the default in C. */ boolean skipCDefaultValidation() default false; /** - * @return what's the type of default (string, int, etc...) + * @return what's the type of default (string, int, etc...). */ DefaultType defaultType() default DefaultType.UNDEFINED; /** - * @return specify the default boolean, if defaultType is BOOLEAN + * @return specify the default boolean, if defaultType is BOOLEAN. */ boolean defaultBoolean() default false; /** - * @return specify the default int, if defaultType is INT + * @return specify the default int, if defaultType is INT. */ int defaultInt() default 0; /** - * @return specify the default long, if defaultType is LONG + * @return specify the default long, if defaultType is LONG. */ long defaultLong() default 0; /** - * @return specify the default double, if defaultType is DOUBLE + * @return specify the default double, if defaultType is DOUBLE. */ double defaultDouble() default 0.0; /** - * @return specify the default string, if defaultType is STRING + * @return specify the default string, if defaultType is STRING. */ String defaultString() default ""; /** - * @return specify a string that acts as a stand-in for the default value when generating documentation + * @return specify a string that acts as a stand-in for the default value when generating documentation. */ String defaultValueString() default ""; @@ -144,17 +144,17 @@ enum IsTimeValue } /** - * @return whether the default value is a time value + * @return whether the default value is a time value. */ IsTimeValue isTimeValue() default IsTimeValue.UNDEFINED; /** - * @return the time unit if the default value is a time value of some sort + * @return the time unit if the default value is a time value of some sort. */ TimeUnit timeUnit() default TimeUnit.NANOSECONDS; /** - * @return whether this config option has a 'context' + * @return whether this config option has a 'context'. */ boolean hasContext() default true; } diff --git a/aeron-annotations/src/main/java/io/aeron/config/ConfigInfo.java b/aeron-annotations/src/main/java/io/aeron/config/ConfigInfo.java index 5c5e17d525..138dce2f03 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/ConfigInfo.java +++ b/aeron-annotations/src/main/java/io/aeron/config/ConfigInfo.java @@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit; /** - * A handy class for storing data that gets serialized into json + * A handy class for storing data that gets serialized into json. */ public class ConfigInfo implements Serializable { @@ -33,7 +33,6 @@ public class ConfigInfo implements Serializable * List of expectations. */ public final ExpectedConfig expectations; - /** * Whether property was found. */ @@ -120,7 +119,7 @@ public class ConfigInfo implements Serializable public boolean deprecated = false; /** - * @param id the unique identifier for this block o' config information + * @param id the unique identifier for this block o' config information. */ public ConfigInfo(final String id) { diff --git a/aeron-annotations/src/main/java/io/aeron/config/ConfigProcessor.java b/aeron-annotations/src/main/java/io/aeron/config/ConfigProcessor.java index f870365037..573974ecd5 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/ConfigProcessor.java +++ b/aeron-annotations/src/main/java/io/aeron/config/ConfigProcessor.java @@ -28,7 +28,7 @@ import java.util.stream.Stream; /** - * ConfigOption processor + * ConfigOption processor. */ @SupportedAnnotationTypes("io.aeron.config.Config") public class ConfigProcessor extends Processor @@ -176,6 +176,7 @@ private ConfigInfo processElement(final Map configInfoMap, f error("Property names must be Strings", element); } break; + case DEFAULT: id = getConfigId(element, DEFAULT_SUFFIXES, config.id()); configInfo = configInfoMap.computeIfAbsent(id, ConfigInfo::new); @@ -198,6 +199,7 @@ private ConfigInfo processElement(final Map configInfoMap, f DefaultType.fromCanonicalName(constantValue.getClass().getCanonicalName()); } break; + default: error("unable to determine config type", element); return null; @@ -236,7 +238,7 @@ private static void handleTimeValue(final Config config, final ConfigInfo config { configInfo.isTimeValue = Stream.of("timeout", "backoff", "delay", "linger", "interval", "duration") - .anyMatch(k -> id.toLowerCase().contains(k)); + .anyMatch((k) -> id.toLowerCase().contains(k)); } break; case TRUE: diff --git a/aeron-annotations/src/main/java/io/aeron/config/DefaultType.java b/aeron-annotations/src/main/java/io/aeron/config/DefaultType.java index 05b1760f09..be51279d23 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/DefaultType.java +++ b/aeron-annotations/src/main/java/io/aeron/config/DefaultType.java @@ -20,7 +20,7 @@ import java.util.Objects; /** - * Indicates the 'type' of the default field/value + * Indicates the 'type' of the default field/value. */ public enum DefaultType { @@ -60,8 +60,8 @@ public enum DefaultType } /** - * @param canonicalName the name of the java class - * @return the associated DefaultType + * @param canonicalName the name of the java class. + * @return the associated DefaultType. */ public static DefaultType fromCanonicalName(final String canonicalName) { @@ -69,8 +69,8 @@ public static DefaultType fromCanonicalName(final String canonicalName) } /** - * @param defaultType a DefaultType or null - * @return true if the type is null or if it's UNDEFINED, otherwise false + * @param defaultType a DefaultType or null. + * @return true if the type is null or if it's UNDEFINED, otherwise false. */ public static boolean isUndefined(final DefaultType defaultType) { @@ -89,7 +89,7 @@ public static boolean isUndefined(final DefaultType defaultType) } /** - * @return indicates whether or not the value is numeric (int or long) + * @return indicates whether the value is numeric (int or long). */ public boolean isNumeric() { @@ -97,7 +97,7 @@ public boolean isNumeric() } /** - * @return a simple name, for display purposes + * @return a simple name, for display purposes. */ public String getSimpleName() { diff --git a/aeron-annotations/src/main/java/io/aeron/config/ExpectedCConfig.java b/aeron-annotations/src/main/java/io/aeron/config/ExpectedCConfig.java index f3459cb053..24de4aecc6 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/ExpectedCConfig.java +++ b/aeron-annotations/src/main/java/io/aeron/config/ExpectedCConfig.java @@ -18,7 +18,7 @@ import java.io.Serializable; /** - * A handy class for storing expected C config info that can be serialized into json + * A handy class for storing expected C config info that can be serialized into json. */ public class ExpectedCConfig implements Serializable { diff --git a/aeron-annotations/src/main/java/io/aeron/config/docgen/GenerateConfigDocTask.java b/aeron-annotations/src/main/java/io/aeron/config/docgen/GenerateConfigDocTask.java index 325de5255b..cf32778c4a 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/docgen/GenerateConfigDocTask.java +++ b/aeron-annotations/src/main/java/io/aeron/config/docgen/GenerateConfigDocTask.java @@ -18,17 +18,15 @@ import io.aeron.utility.ElementIO; /** - * A gradle task for generating config documentation + * A gradle task for generating config documentation. */ public class GenerateConfigDocTask { /** * @param args - * Arg 0 should be the location of a config-info.xml file with a list of ConfigInfo objects - * Arg 1 should be the location of an output file where a .md file is to be written - * - * @throws Exception - * it sure does + * Arg 0 should be the location of a config-info.xml file with a list of ConfigInfo objects. + * Arg 1 should be the location of an output file where a .md file is to be written. + * @throws Exception on IO failure. */ public static void main(final String[] args) throws Exception { diff --git a/aeron-annotations/src/main/java/io/aeron/config/validation/ValidateConfigExpectationsTask.java b/aeron-annotations/src/main/java/io/aeron/config/validation/ValidateConfigExpectationsTask.java index cd4c7e5c27..4bd7b8a4d5 100644 --- a/aeron-annotations/src/main/java/io/aeron/config/validation/ValidateConfigExpectationsTask.java +++ b/aeron-annotations/src/main/java/io/aeron/config/validation/ValidateConfigExpectationsTask.java @@ -18,7 +18,7 @@ import io.aeron.utility.ElementIO; /** - * A gradle task for validating the C code looks as expected, based on the contents of the @Config java annotations + * A gradle task for validating the C code looks as expected, based on the contents of the @Config java annotations. */ public class ValidateConfigExpectationsTask { @@ -26,9 +26,7 @@ public class ValidateConfigExpectationsTask * @param args * Arg 0 should be the location of a config-info.xml file with a list of ConfigInfo objects * Arg 1 should be the location of the C source code - * - * @throws Exception - * it sure does + * @throws Exception on IO failure. */ public static void main(final String[] args) throws Exception { diff --git a/aeron-annotations/src/main/java/io/aeron/counter/AeronCounter.java b/aeron-annotations/src/main/java/io/aeron/counter/AeronCounter.java index 2bda133b9f..d04a836bf1 100644 --- a/aeron-annotations/src/main/java/io/aeron/counter/AeronCounter.java +++ b/aeron-annotations/src/main/java/io/aeron/counter/AeronCounter.java @@ -21,19 +21,19 @@ import java.lang.annotation.Target; /** - * Annotation to indicate this is an Aeron counter + * Annotation to indicate this is an Aeron counter. */ @Target({ElementType.FIELD}) @Retention(RetentionPolicy.SOURCE) public @interface AeronCounter { /** - * @return whether this counter exists in the C code + * @return whether this counter exists in the C code. */ boolean existsInC() default true; /** - * @return the name of the #define in C + * @return the name of the #define in C. */ String expectedCName() default ""; } diff --git a/aeron-annotations/src/main/java/io/aeron/counter/CounterInfo.java b/aeron-annotations/src/main/java/io/aeron/counter/CounterInfo.java index ef01db6320..4a6d85d155 100644 --- a/aeron-annotations/src/main/java/io/aeron/counter/CounterInfo.java +++ b/aeron-annotations/src/main/java/io/aeron/counter/CounterInfo.java @@ -18,7 +18,7 @@ import java.io.Serializable; /** - * A handy class for storing data that gets serialized into json + * A handy class for storing data that gets serialized into json. */ public class CounterInfo implements Serializable { @@ -50,6 +50,7 @@ public class CounterInfo implements Serializable public String expectedCName; /** + * Default constructor. */ public CounterInfo() { diff --git a/aeron-annotations/src/main/java/io/aeron/counter/CounterProcessor.java b/aeron-annotations/src/main/java/io/aeron/counter/CounterProcessor.java index 88cd7906a5..975abd606f 100644 --- a/aeron-annotations/src/main/java/io/aeron/counter/CounterProcessor.java +++ b/aeron-annotations/src/main/java/io/aeron/counter/CounterProcessor.java @@ -29,24 +29,21 @@ import java.util.regex.Pattern; /** - * AeronCounter processor + * AeronCounter processor. */ @SupportedAnnotationTypes("io.aeron.counter.AeronCounter") public class CounterProcessor extends Processor { - @Override protected String getEnabledPropertyName() { return "aeron.build.counterProcessor.enabled"; } - @Override protected String getPrintNotesPropertyName() { return "aeron.build.counterProcessor.printNotes"; } - @Override protected String getFailOnErrorPropertyName() { return "aeron.build.counterProcessor.failOnError"; @@ -55,7 +52,6 @@ protected String getFailOnErrorPropertyName() /** * {@inheritDoc} */ - @Override public void doProcess(final Set annotations, final RoundEnvironment roundEnv) { final Map counterInfoMap = new HashMap<>(); diff --git a/aeron-annotations/src/main/java/io/aeron/counter/validation/ValidateCounterExpectationsTask.java b/aeron-annotations/src/main/java/io/aeron/counter/validation/ValidateCounterExpectationsTask.java index 3c76e36b14..5e59d8d440 100644 --- a/aeron-annotations/src/main/java/io/aeron/counter/validation/ValidateCounterExpectationsTask.java +++ b/aeron-annotations/src/main/java/io/aeron/counter/validation/ValidateCounterExpectationsTask.java @@ -18,7 +18,7 @@ import io.aeron.utility.ElementIO; /** - * A gradle task for validating C counters conform to expectations set by the AeronCounter annotation in java + * A gradle task for validating C counters conform to expectations set by the AeronCounter annotation in java. */ public class ValidateCounterExpectationsTask { @@ -26,9 +26,7 @@ public class ValidateCounterExpectationsTask * @param args * Arg 0 should be the location of a counter-info.xml file with a list of CounterInfo objects * Arg 1 should be the location of the C source code - * - * @throws Exception - * it sure does + * @throws Exception on IO failure. */ public static void main(final String[] args) throws Exception { diff --git a/aeron-annotations/src/main/java/io/aeron/utility/ElementIO.java b/aeron-annotations/src/main/java/io/aeron/utility/ElementIO.java index 80266fbbba..c5cd4198b0 100644 --- a/aeron-annotations/src/main/java/io/aeron/utility/ElementIO.java +++ b/aeron-annotations/src/main/java/io/aeron/utility/ElementIO.java @@ -32,7 +32,7 @@ public class ElementIO * @param elementsFilename the name of the filename that contains a list of objects * @return a list of elements * @param the type of elements - ConfigInfo or CounterInfo - * @throws Exception yup + * @throws Exception on IO failure. */ @SuppressWarnings("unchecked") public static List read(final String elementsFilename) throws Exception @@ -46,7 +46,7 @@ public static List read(final String elementsFilename) throws Exception /** * @param resourceFile the destination file to write to * @param elements a Collection of elements - * @throws Exception yup + * @throws Exception on IO failure. */ public static void write(final FileObject resourceFile, final Collection elements) throws Exception { diff --git a/aeron-annotations/src/main/java/io/aeron/utility/Processor.java b/aeron-annotations/src/main/java/io/aeron/utility/Processor.java index a64d03f622..27b1343b20 100644 --- a/aeron-annotations/src/main/java/io/aeron/utility/Processor.java +++ b/aeron-annotations/src/main/java/io/aeron/utility/Processor.java @@ -24,7 +24,7 @@ import java.util.Set; /** - * abstract processor + * Abstract processor. */ public abstract class Processor extends AbstractProcessor { @@ -37,7 +37,6 @@ public abstract class Processor extends AbstractProcessor /** * {@inheritDoc} */ - @Override public SourceVersion getSupportedSourceVersion() { return SourceVersion.latest(); @@ -46,7 +45,6 @@ public SourceVersion getSupportedSourceVersion() /** * {@inheritDoc} */ - @Override public synchronized void init(final ProcessingEnvironment processingEnv) { enabled = System.getProperty(getEnabledPropertyName(), "true").equalsIgnoreCase("true"); @@ -87,7 +85,9 @@ public synchronized void init(final ProcessingEnvironment processingEnv) */ protected abstract void doProcess(Set annotations, RoundEnvironment roundEnv); - @Override + /** + * {@inheritDoc} + */ public boolean process(final Set annotations, final RoundEnvironment roundEnv) { if (enabled) diff --git a/aeron-annotations/src/main/java/io/aeron/validation/Grep.java b/aeron-annotations/src/main/java/io/aeron/validation/Grep.java index 5f051be354..a91bcf00e5 100644 --- a/aeron-annotations/src/main/java/io/aeron/validation/Grep.java +++ b/aeron-annotations/src/main/java/io/aeron/validation/Grep.java @@ -23,14 +23,14 @@ import java.util.stream.Collectors; /** - * A utility class for running 'grep' + * A utility class for running 'grep'. */ public final class Grep { /** - * @param pattern the regex pattern passed to grep - * @param sourceDir the base directory where the search should begin - * @return a Grep object with the results of the action + * @param pattern the regex pattern passed to grep. + * @param sourceDir the base directory where the search should begin. + * @return a Grep object with the results of the action. */ public static Grep execute(final String pattern, final String sourceDir) { @@ -84,7 +84,7 @@ private Grep(final String commandString, final int exitCode, final List } /** - * @return whether or not grep succeeded + * @return whether grep succeeded. */ public boolean success() { @@ -94,7 +94,7 @@ public boolean success() /** * @param expectOneLine many of the usages expect only a single line to be found. * if more than one are found, that counts as a failure - * @return whether or not grep succeeded + * @return whether grep succeeded. */ public boolean success(final boolean expectOneLine) { diff --git a/aeron-annotations/src/main/java/io/aeron/version/Version.java b/aeron-annotations/src/main/java/io/aeron/version/Version.java index 27aa1fb9b3..935b63248b 100644 --- a/aeron-annotations/src/main/java/io/aeron/version/Version.java +++ b/aeron-annotations/src/main/java/io/aeron/version/Version.java @@ -16,27 +16,27 @@ package io.aeron.version; /** - * version information for a specific component + * Version information for a specific component. */ public interface Version { - /** - * @return major version portion - */ + /** + * @return major version portion. + */ int majorVersion(); - /** - * @return minor version portion - */ + /** + * @return minor version portion. + */ int minorVersion(); - /** - * @return patched version portion - */ + /** + * @return patched version portion. + */ int patchVersion(); - /** - * @return git SHA - */ + /** + * @return git SHA. + */ String gitSha(); } diff --git a/aeron-annotations/src/main/java/io/aeron/version/VersionProcessor.java b/aeron-annotations/src/main/java/io/aeron/version/VersionProcessor.java index 2bccdc8311..aabff2483e 100644 --- a/aeron-annotations/src/main/java/io/aeron/version/VersionProcessor.java +++ b/aeron-annotations/src/main/java/io/aeron/version/VersionProcessor.java @@ -31,7 +31,7 @@ import java.util.regex.Pattern; /** - * Version processor + * Version processor. */ @SupportedAnnotationTypes("io.aeron.version.Versioned") @SupportedOptions({"io.aeron.version", "io.aeron.gitsha"}) diff --git a/aeron-archive/src/main/java/io/aeron/archive/Archive.java b/aeron-archive/src/main/java/io/aeron/archive/Archive.java index 4fbc1f867f..30d74a2309 100644 --- a/aeron-archive/src/main/java/io/aeron/archive/Archive.java +++ b/aeron-archive/src/main/java/io/aeron/archive/Archive.java @@ -71,7 +71,7 @@ import static org.agrona.SystemUtil.*; /** - * The Aeron Archive which allows for the recording and replay of local and remote {@link io.aeron.Publication}s . + * The Aeron Archive which allows for the recording and replay of local and remote {@link io.aeron.Publication}s. */ @Versioned public final class Archive implements AutoCloseable @@ -399,7 +399,7 @@ public static final class Configuration public static final String MAX_CATALOG_ENTRIES_PROP_NAME = "aeron.archive.max.catalog.entries"; /** - * Default limit for the entries in the {@link Catalog} + * Default limit for the entries in the {@link Catalog}. * * @see #MAX_CATALOG_ENTRIES_PROP_NAME */ diff --git a/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java b/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java index 9646065b25..a1d5bd33d2 100644 --- a/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java +++ b/aeron-archive/src/main/java/io/aeron/archive/client/AeronArchive.java @@ -2808,7 +2808,7 @@ public static int controlMtuLength() } /** - * The value of system property {@link #CONTROL_CHANNEL_PROP_NAME} if set, null otherwise + * The value of system property {@link #CONTROL_CHANNEL_PROP_NAME} if set, null otherwise. * * @return system property {@link #CONTROL_CHANNEL_PROP_NAME} if set. */ diff --git a/aeron-archive/src/main/java/io/aeron/archive/client/ArchiveException.java b/aeron-archive/src/main/java/io/aeron/archive/client/ArchiveException.java index 5c0963eff2..e8463cccee 100644 --- a/aeron-archive/src/main/java/io/aeron/archive/client/ArchiveException.java +++ b/aeron-archive/src/main/java/io/aeron/archive/client/ArchiveException.java @@ -94,7 +94,7 @@ public class ArchiveException extends AeronException public static final int UNAUTHORISED_ACTION = 13; /** - * The replication session failed to connect to the source archive + * The replication session failed to connect to the source archive. */ public static final int REPLICATION_CONNECTION_FAILURE = 14; diff --git a/aeron-archive/src/main/java/io/aeron/archive/client/ReplayParams.java b/aeron-archive/src/main/java/io/aeron/archive/client/ReplayParams.java index 8db429189b..6aa17e43c6 100644 --- a/aeron-archive/src/main/java/io/aeron/archive/client/ReplayParams.java +++ b/aeron-archive/src/main/java/io/aeron/archive/client/ReplayParams.java @@ -18,8 +18,10 @@ import io.aeron.Aeron; /** - * Fluent API for setting optional replay parameters. Not threadsafe. Allows the user to configure starting position, + * Fluent API for setting optional replay parameters. Allows the user to configure starting position, * replay length, bounding counter (for a bounded replay) and the max length for file I/O operations. + *

+ * Not threadsafe. */ public class ReplayParams { @@ -31,7 +33,7 @@ public class ReplayParams private long subscriptionRegistrationId; /** - * Default, initialise all values to "null" + * Default, initialise all values to "null". */ @SuppressWarnings("this-escape") public ReplayParams() @@ -40,7 +42,7 @@ public ReplayParams() } /** - * reset all value to "null", allows for an instance to be reused + * Reset all value to "null", allows for an instance to be reused. * * @return this for a fluent API */ diff --git a/aeron-client/src/main/java/io/aeron/Aeron.java b/aeron-client/src/main/java/io/aeron/Aeron.java index f707a9c57f..dbe909e9e0 100644 --- a/aeron-client/src/main/java/io/aeron/Aeron.java +++ b/aeron-client/src/main/java/io/aeron/Aeron.java @@ -741,7 +741,7 @@ public static class Configuration static final long AWAITING_IDLE_SLEEP_MS = 1; /** - * Duration to sleep when idle + * Duration to sleep when idle. */ @Config(expectedCDefaultFieldName = "AERON_CONTEXT_IDLE_SLEEP_DURATION_NS_DEFAULT") public static final String IDLE_SLEEP_DURATION_PROP_NAME = "aeron.client.idle.sleep.duration"; diff --git a/aeron-client/src/main/java/io/aeron/AeronCounters.java b/aeron-client/src/main/java/io/aeron/AeronCounters.java index b6d9ca06ca..7d9136c457 100644 --- a/aeron-client/src/main/java/io/aeron/AeronCounters.java +++ b/aeron-client/src/main/java/io/aeron/AeronCounters.java @@ -73,8 +73,7 @@ public final class AeronCounters /** * The highest position the Receiver has rebuilt up to on a session-channel-stream tuple while rebuilding the - * stream. - * The stream is complete up to this point. + * stream.The stream is complete up to this point. */ @AeronCounter(expectedCName = "RECEIVER_POSITION") public static final int DRIVER_RECEIVER_POS_TYPE_ID = 5; @@ -190,7 +189,7 @@ public final class AeronCounters public static final int ARCHIVE_CYCLE_TIME_THRESHOLD_EXCEEDED_TYPE_ID = 104; /** - * The type id of the {@link Counter} used for keeping track of the max time it took recoder to write a block of + * The type id of the {@link Counter} used for keeping track of the max time it took recorder to write a block of * data to the storage. */ @AeronCounter @@ -392,7 +391,7 @@ public final class AeronCounters public static final int CLUSTER_STANDBY_HEARTBEAT_RESPONSE_COUNT_TYPE_ID = 222; /** - * Standby control toggle type id + * Standby control toggle type id. */ @AeronCounter public static final int CLUSTER_STANDBY_CONTROL_TOGGLE_TYPE_ID = 223; @@ -424,13 +423,13 @@ public final class AeronCounters public static final int TRANSITION_MODULE_ERROR_COUNT_TYPE_ID = 226; /** - * The type if of the {@link Counter} used for transition module state + * The type if of the {@link Counter} used for transition module state. */ @AeronCounter(expectedCName = "CLUSTER_TRANSITION_MODULE_STATE") public static final int TRANSITION_MODULE_STATE_TYPE_ID = 224; /** - * Transition module control toggle type id + * Transition module control toggle type id. */ @AeronCounter(expectedCName = "CLUSTER_TRANSITION_MODULE_CONTROL_TOGGLE") public static final int TRANSITION_MODULE_CONTROL_TOGGLE_TYPE_ID = 225; @@ -523,7 +522,7 @@ public static void validateCounterTypeId( } /** - * Convenience overload for {@link AeronCounters#validateCounterTypeId(CountersReader, int, int)} + * Convenience overload for {@link AeronCounters#validateCounterTypeId(CountersReader, int, int)}. * * @param aeron to resolve a counters' reader. * @param counter to be checked for the appropriate counterTypeId. diff --git a/aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java b/aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java index f94c188ef8..aeaab2b624 100644 --- a/aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java +++ b/aeron-client/src/main/java/io/aeron/ChannelUriStringBuilder.java @@ -82,7 +82,7 @@ public final class ChannelUriStringBuilder private Integer maxResend; /** - * Default constructor + * Default constructor. */ public ChannelUriStringBuilder() { diff --git a/aeron-client/src/main/java/io/aeron/CommonContext.java b/aeron-client/src/main/java/io/aeron/CommonContext.java index 1e4b3dfcf3..99c4dda317 100644 --- a/aeron-client/src/main/java/io/aeron/CommonContext.java +++ b/aeron-client/src/main/java/io/aeron/CommonContext.java @@ -136,13 +136,13 @@ public static InferableBoolean parse(final String value) public static final String AERON_DIR_PROP_NAME = "aeron.dir"; /** - * The value of the top level Aeron directory unless overridden by {@link #aeronDirectoryName(String)} + * The value of the top level Aeron directory unless overridden by {@link #aeronDirectoryName(String)}. */ @Config(id = "AERON_DIR", defaultType = DefaultType.STRING, defaultString = "OS specific") public static final String AERON_DIR_PROP_DEFAULT; /** - * Should new/experimental features be enabled.\ + * Should new/experimental features be enabled. * * @since 1.44.0 */ @@ -167,12 +167,12 @@ public static InferableBoolean parse(final String value) public static final String UDP_MEDIA = "udp"; /** - * URI base used for IPC channels for {@link Publication}s and {@link Subscription}s + * URI base used for IPC channels for {@link Publication}s and {@link Subscription}s. */ public static final String IPC_CHANNEL = "aeron:ipc"; /** - * URI base used for UDP channels for {@link Publication}s and {@link Subscription}s + * URI base used for UDP channels for {@link Publication}s and {@link Subscription}s. */ public static final String UDP_CHANNEL = "aeron:udp"; @@ -266,7 +266,7 @@ public static InferableBoolean parse(final String value) public static final String RELIABLE_STREAM_PARAM_NAME = "reliable"; /** - * Key for the tags for a channel + * Key for the tags for a channel. */ public static final String TAGS_PARAM_NAME = "tags"; @@ -406,21 +406,21 @@ public static InferableBoolean parse(final String value) public static final String NAK_DELAY_PARAM_NAME = "nak-delay"; /** - * Parameter name to set explicit untethered window limit timeout (e.g. {@code untethered-window-limit-timeout=10s}) + * Parameter name to set explicit untethered window limit timeout, e.g. {@code untethered-window-limit-timeout=10s}. * * @since 1.45.0 */ public static final String UNTETHERED_WINDOW_LIMIT_TIMEOUT_PARAM_NAME = "untethered-window-limit-timeout"; /** - * Parameter name to set explicit untethered resting timeout (e.g. {@code untethered-resting-timeout=10s}) + * Parameter name to set explicit untethered resting timeout, e.g. {@code untethered-resting-timeout=10s}. * * @since 1.45.0 */ public static final String UNTETHERED_RESTING_TIMEOUT_PARAM_NAME = "untethered-resting-timeout"; /** - * Parameter name to set the max number of outstanding active retransmits for a publication + * Parameter name to set the max number of outstanding active retransmits for a publication. * * @since 1.45.0 */ @@ -728,7 +728,7 @@ public File cncFile() } /** - * Set the driver timeout in milliseconds + * Set the driver timeout in milliseconds. * * @param driverTimeoutMs to indicate liveness of driver * @return this for a fluent API. @@ -1019,7 +1019,7 @@ public static boolean requestDriverTermination( } /** - * Read the error log to a given {@link PrintStream} + * Read the error log to a given {@link PrintStream}. * * @param out to write the error log contents to. * @return the number of observations from the error log. @@ -1038,7 +1038,7 @@ public int saveErrorLog(final PrintStream out) } /** - * Read the error log to a given {@link PrintStream} + * Read the error log to a given {@link PrintStream}. * * @param out to write the error log contents to. * @param cncByteBuffer containing the error log. diff --git a/aeron-client/src/main/java/io/aeron/command/ControlProtocolEvents.java b/aeron-client/src/main/java/io/aeron/command/ControlProtocolEvents.java index 616309887d..549cf9b192 100644 --- a/aeron-client/src/main/java/io/aeron/command/ControlProtocolEvents.java +++ b/aeron-client/src/main/java/io/aeron/command/ControlProtocolEvents.java @@ -170,7 +170,7 @@ public class ControlProtocolEvents public static final int ON_STATIC_COUNTER = 0x0F0B; /** - * Inform clients of error frame received by publication + * Inform clients of error frame received by publication. * @since 1.47.0 */ public static final int ON_PUBLICATION_ERROR = 0x0F0C; diff --git a/aeron-client/src/main/java/io/aeron/command/CorrelatedMessageFlyweight.java b/aeron-client/src/main/java/io/aeron/command/CorrelatedMessageFlyweight.java index 6de1f83959..ad341c996a 100644 --- a/aeron-client/src/main/java/io/aeron/command/CorrelatedMessageFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/CorrelatedMessageFlyweight.java @@ -72,9 +72,9 @@ public long clientId() } /** - * set client id field + * Set client id field. * - * @param clientId field value + * @param clientId field value. * @return this for a fluent API. */ public CorrelatedMessageFlyweight clientId(final long clientId) diff --git a/aeron-client/src/main/java/io/aeron/command/CounterUpdateFlyweight.java b/aeron-client/src/main/java/io/aeron/command/CounterUpdateFlyweight.java index ade8b282b3..1f6f59918c 100644 --- a/aeron-client/src/main/java/io/aeron/command/CounterUpdateFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/CounterUpdateFlyweight.java @@ -96,9 +96,9 @@ public int counterId() } /** - * Set counter id field + * Set counter id field. * - * @param counterId field value + * @param counterId field value. * @return this for a fluent API. */ public CounterUpdateFlyweight counterId(final int counterId) diff --git a/aeron-client/src/main/java/io/aeron/command/ImageBuffersReadyFlyweight.java b/aeron-client/src/main/java/io/aeron/command/ImageBuffersReadyFlyweight.java index 46f116584f..24665db87a 100644 --- a/aeron-client/src/main/java/io/aeron/command/ImageBuffersReadyFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/ImageBuffersReadyFlyweight.java @@ -152,9 +152,9 @@ public ImageBuffersReadyFlyweight streamId(final int streamId) } /** - * Set the position counter Id for the subscriber + * Set the position counter Id for the subscriber. * - * @param id for the subscriber position counter + * @param id for the subscriber position counter. * @return this for a fluent API. */ public ImageBuffersReadyFlyweight subscriberPositionId(final int id) @@ -200,7 +200,7 @@ public long subscriptionRegistrationId() /** * The Log Filename in ASCII. * - * @return log filename + * @return log filename. */ public String logFileName() { @@ -218,7 +218,7 @@ public void appendLogFileName(final Appendable appendable) } /** - * Set the log filename in ASCII + * Set the log filename in ASCII. * * @param logFileName for the image. * @return this for a fluent API. @@ -264,11 +264,11 @@ public ImageBuffersReadyFlyweight sourceIdentity(final String value) } /** - * Get the length of the current message + * Get the length of the current message. *

* NB: must be called after the data is written in order to be accurate. * - * @return the length of the current message + * @return the length of the current message. */ public int length() { diff --git a/aeron-client/src/main/java/io/aeron/command/ImageMessageFlyweight.java b/aeron-client/src/main/java/io/aeron/command/ImageMessageFlyweight.java index e8d76962a5..041c9b7764 100644 --- a/aeron-client/src/main/java/io/aeron/command/ImageMessageFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/ImageMessageFlyweight.java @@ -21,7 +21,7 @@ import static org.agrona.BitUtil.SIZE_OF_LONG; /** - * Control message flyweight for any message that needs to represent a connection + * Control message flyweight for any message that needs to represent a connection. *

  *   0                   1                   2                   3
  *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -80,7 +80,7 @@ public long correlationId()
     /**
      * Set the correlation id field.
      *
-     * @param correlationId field value
+     * @param correlationId field value.
      * @return this for a fluent API.
      */
     public ImageMessageFlyweight correlationId(final long correlationId)
@@ -103,7 +103,7 @@ public long subscriptionRegistrationId()
     /**
      * Set the registration ID for the subscription.
      *
-     * @param registrationId for the subscription
+     * @param registrationId for the subscription.
      * @return this for a fluent API.
      */
     public ImageMessageFlyweight subscriptionRegistrationId(final long registrationId)
@@ -163,9 +163,9 @@ public void appendChannel(final Appendable appendable)
     }
 
     /**
-     * Set the channel field as ASCII
+     * Set the channel field as ASCII.
      *
-     * @param channel field value
+     * @param channel field value.
      * @return this for a fluent API.
      */
     public ImageMessageFlyweight channel(final String channel)
@@ -176,11 +176,11 @@ public ImageMessageFlyweight channel(final String channel)
     }
 
     /**
-     * Get the length of the current message
+     * Get the length of the current message.
      * 

* NB: must be called after the data is written in order to be accurate. * - * @return the length of the current message + * @return the length of the current message. */ public int length() { diff --git a/aeron-client/src/main/java/io/aeron/command/PublicationErrorFrameFlyweight.java b/aeron-client/src/main/java/io/aeron/command/PublicationErrorFrameFlyweight.java index d72c187978..8f59b4b3cb 100644 --- a/aeron-client/src/main/java/io/aeron/command/PublicationErrorFrameFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/PublicationErrorFrameFlyweight.java @@ -103,7 +103,7 @@ public final PublicationErrorFrameFlyweight wrap(final MutableDirectBuffer buffe /** * Return registration ID of the publication that received the error frame. * - * @return registration ID of the publication + * @return registration ID of the publication. */ public long registrationId() { @@ -126,7 +126,7 @@ public PublicationErrorFrameFlyweight registrationId(final long registrationId) * Return registration id of the destination that received the error frame. This will only be set if the publication * is using manual MDC. * - * @return registration ID of the publication or {@link io.aeron.Aeron#NULL_VALUE} + * @return registration ID of the publication or {@link io.aeron.Aeron#NULL_VALUE}. */ public long destinationRegistrationId() { @@ -193,7 +193,7 @@ public PublicationErrorFrameFlyweight sessionId(final int sessionId) } /** - * Get the receiver id field + * Get the receiver id field. * * @return get the receiver id field. */ @@ -203,7 +203,7 @@ public long receiverId() } /** - * Set receiver id field + * Set receiver id field. * * @param receiverId field value. * @return this for a fluent API. @@ -340,7 +340,7 @@ public PublicationErrorFrameFlyweight errorCode(final ErrorCode code) /** * Error message associated with the error. * - * @return error message + * @return error message. */ public String errorMessage() { diff --git a/aeron-client/src/main/java/io/aeron/command/StaticCounterFlyweight.java b/aeron-client/src/main/java/io/aeron/command/StaticCounterFlyweight.java index 7f545d6a83..2e73373bc2 100644 --- a/aeron-client/src/main/java/io/aeron/command/StaticCounterFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/StaticCounterFlyweight.java @@ -96,9 +96,9 @@ public int counterId() } /** - * Set counter id field + * Set counter id field. * - * @param counterId field value + * @param counterId field value. * @return this for a fluent API. */ public StaticCounterFlyweight counterId(final int counterId) @@ -108,7 +108,6 @@ public StaticCounterFlyweight counterId(final int counterId) return this; } - /** * {@inheritDoc} */ diff --git a/aeron-client/src/main/java/io/aeron/command/SubscriptionReadyFlyweight.java b/aeron-client/src/main/java/io/aeron/command/SubscriptionReadyFlyweight.java index aa898c3d41..350d60b338 100644 --- a/aeron-client/src/main/java/io/aeron/command/SubscriptionReadyFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/SubscriptionReadyFlyweight.java @@ -96,7 +96,7 @@ public int channelStatusCounterId() } /** - * Set channel status counter id field + * Set channel status counter id field. * * @param counterId field value. * @return this for a fluent API. diff --git a/aeron-client/src/main/java/io/aeron/command/TerminateDriverFlyweight.java b/aeron-client/src/main/java/io/aeron/command/TerminateDriverFlyweight.java index 38f6e09b0e..f69aa78b0f 100644 --- a/aeron-client/src/main/java/io/aeron/command/TerminateDriverFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/command/TerminateDriverFlyweight.java @@ -27,7 +27,6 @@ /** * Command message flyweight to ask the driver process to terminate. * - * @see ControlProtocolEvents *

  *   0                   1                   2                   3
  *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -44,6 +43,7 @@
  * ...                                                              |
  *  +---------------------------------------------------------------+
  * 
+ * @see ControlProtocolEvents */ public class TerminateDriverFlyweight extends CorrelatedMessageFlyweight { @@ -65,9 +65,9 @@ public TerminateDriverFlyweight wrap(final MutableDirectBuffer buffer, final int } /** - * Relative offset of the token buffer + * Relative offset of the token buffer. * - * @return relative offset of the token buffer + * @return relative offset of the token buffer. */ public int tokenBufferOffset() { @@ -75,9 +75,9 @@ public int tokenBufferOffset() } /** - * Length of the token buffer in bytes + * Length of the token buffer in bytes. * - * @return length of token buffer in bytes + * @return length of token buffer in bytes. */ public int tokenBufferLength() { diff --git a/aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java b/aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java index f8e412fe11..991af9cc10 100644 --- a/aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java +++ b/aeron-client/src/main/java/io/aeron/logbuffer/FrameDescriptor.java @@ -77,32 +77,32 @@ public class FrameDescriptor public static final byte UNFRAGMENTED = BEGIN_FRAG_FLAG | END_FRAG_FLAG; /** - * Offset within a frame at which the version field begins + * Offset within a frame at which the version field begins. */ public static final int VERSION_OFFSET = DataHeaderFlyweight.VERSION_FIELD_OFFSET; /** - * Offset within a frame at which the flags field begins + * Offset within a frame at which the flags field begins. */ public static final int FLAGS_OFFSET = DataHeaderFlyweight.FLAGS_FIELD_OFFSET; /** - * Offset within a frame at which the type field begins + * Offset within a frame at which the type field begins. */ public static final int TYPE_OFFSET = DataHeaderFlyweight.TYPE_FIELD_OFFSET; /** - * Offset within a frame at which the term offset field begins + * Offset within a frame at which the term offset field begins. */ public static final int TERM_OFFSET = DataHeaderFlyweight.TERM_OFFSET_FIELD_OFFSET; /** - * Offset within a frame at which the term id field begins + * Offset within a frame at which the term id field begins. */ public static final int TERM_ID_OFFSET = DataHeaderFlyweight.TERM_ID_FIELD_OFFSET; /** - * Offset within a frame at which the session id field begins + * Offset within a frame at which the session id field begins. */ public static final int SESSION_ID_OFFSET = DataHeaderFlyweight.SESSION_ID_FIELD_OFFSET; @@ -372,7 +372,7 @@ public static void frameTermId(final UnsafeBuffer buffer, final int termOffset, * * @param buffer containing the frame. * @param termOffset at which a frame begins. - * @param sessionId value for the frame. + * @param sessionId value for the frame. */ public static void frameSessionId(final UnsafeBuffer buffer, final int termOffset, final int sessionId) { diff --git a/aeron-client/src/main/java/io/aeron/logbuffer/Header.java b/aeron-client/src/main/java/io/aeron/logbuffer/Header.java index a241b06d1b..b2722ababe 100644 --- a/aeron-client/src/main/java/io/aeron/logbuffer/Header.java +++ b/aeron-client/src/main/java/io/aeron/logbuffer/Header.java @@ -248,9 +248,9 @@ public int nextTermOffset() } /** - * The type of the frame which should always be {@link DataHeaderFlyweight#HDR_TYPE_DATA} + * The type of the frame which should always be {@link DataHeaderFlyweight#HDR_TYPE_DATA}. * - * @return type of the frame which should always be {@link DataHeaderFlyweight#HDR_TYPE_DATA} + * @return type of the frame which should always be {@link DataHeaderFlyweight#HDR_TYPE_DATA}. */ public int type() { diff --git a/aeron-client/src/main/java/io/aeron/protocol/DataHeaderFlyweight.java b/aeron-client/src/main/java/io/aeron/protocol/DataHeaderFlyweight.java index b1376834b7..1bdd0f7c22 100644 --- a/aeron-client/src/main/java/io/aeron/protocol/DataHeaderFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/protocol/DataHeaderFlyweight.java @@ -335,9 +335,9 @@ public DataHeaderFlyweight reservedValue(final long reservedValue) } /** - * Return offset in buffer for data + * Return offset in buffer for data. * - * @return offset of data in the buffer + * @return offset of data in the buffer. */ public int dataOffset() { diff --git a/aeron-client/src/main/java/io/aeron/protocol/HeaderFlyweight.java b/aeron-client/src/main/java/io/aeron/protocol/HeaderFlyweight.java index 48195109e5..1bf345ebdc 100644 --- a/aeron-client/src/main/java/io/aeron/protocol/HeaderFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/protocol/HeaderFlyweight.java @@ -40,72 +40,72 @@ public class HeaderFlyweight extends UnsafeBuffer { /** - * header type PAD + * Header type PAD. */ public static final int HDR_TYPE_PAD = 0x00; /** - * header type DATA + * Header type DATA. */ public static final int HDR_TYPE_DATA = 0x01; /** - * header type NAK + * Header type NAK. */ public static final int HDR_TYPE_NAK = 0x02; /** - * header type SM + * Header type SM. */ public static final int HDR_TYPE_SM = 0x03; /** - * header type ERR + * Header type ERR. */ public static final int HDR_TYPE_ERR = 0x04; /** - * header type SETUP + * Header type SETUP. */ public static final int HDR_TYPE_SETUP = 0x05; /** - * header type RTT Measurement + * Header type RTT Measurement. */ public static final int HDR_TYPE_RTTM = 0x06; /** - * header type RESOLUTION + * Header type RESOLUTION. */ public static final int HDR_TYPE_RES = 0x07; /** - * header type ATS Data + * Header type ATS Data. */ public static final int HDR_TYPE_ATS_DATA = 0x08; /** - * header type ATS Status Message + * Header type ATS Status Message. */ public static final int HDR_TYPE_ATS_SM = 0x09; /** - * header type ATS Setup + * Header type ATS Setup. */ public static final int HDR_TYPE_ATS_SETUP = 0x0A; /** - * header type Response Setup + * Header type Response Setup. */ public static final int HDR_TYPE_RSP_SETUP = 0x0B; /** - * header type EXT + * Header type EXT. */ public static final int HDR_TYPE_EXT = 0xFFFF; /** - * default version + * Default version. */ public static final byte CURRENT_VERSION = 0x0; diff --git a/aeron-client/src/main/java/io/aeron/protocol/ResolutionEntryFlyweight.java b/aeron-client/src/main/java/io/aeron/protocol/ResolutionEntryFlyweight.java index 6b8e7d96c9..da3595f46c 100644 --- a/aeron-client/src/main/java/io/aeron/protocol/ResolutionEntryFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/protocol/ResolutionEntryFlyweight.java @@ -54,7 +54,7 @@ public class ResolutionEntryFlyweight extends HeaderFlyweight public static final int ADDRESS_LENGTH_IP6 = 16; /** - * (S) - Self flag + * (S) - Self flag. */ public static final short SELF_FLAG = 0x80; diff --git a/aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java b/aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java index 4fd45cc7ff..027afbb448 100644 --- a/aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java +++ b/aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java @@ -33,17 +33,17 @@ public class StatusMessageFlyweight extends HeaderFlyweight { /** - * Length of the Status Message Frame + * Length of the Status Message Frame. */ public static final int HEADER_LENGTH = 36; /** - * Publisher should send SETUP frame + * Publisher should send SETUP frame. */ public static final short SEND_SETUP_FLAG = 0x80; /** - * Publisher should treat Subscriber as going away + * Publisher should treat Subscriber as going away. */ public static final short END_OF_STREAM_FLAG = 0x40; diff --git a/aeron-client/src/main/java/io/aeron/security/SimpleAuthenticator.java b/aeron-client/src/main/java/io/aeron/security/SimpleAuthenticator.java index eeff46736a..1ab7106502 100644 --- a/aeron-client/src/main/java/io/aeron/security/SimpleAuthenticator.java +++ b/aeron-client/src/main/java/io/aeron/security/SimpleAuthenticator.java @@ -89,7 +89,7 @@ public void onChallengedSession(final SessionProxy sessionProxy, final long nowM } /** - * Builder to create instances of SimpleAuthenticator + * Builder to create instances of SimpleAuthenticator. */ public static class Builder { @@ -106,8 +106,8 @@ public static class Builder * .newInstance(); *
* - * @param encodedPrincipal principal encoded as a byte array. - * @param encodedCredentials credentials encoded as a byte array. + * @param encodedPrincipal principal encoded as a byte array. + * @param encodedCredentials credentials encoded as a byte array. * @return this for a fluent API. */ public Builder principal(final byte[] encodedPrincipal, final byte[] encodedCredentials) diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java index 95e263a418..517dc679e6 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackup.java @@ -187,7 +187,7 @@ public static State get(final long code) } /** - * Defines the type of node that this will receive log data from + * Defines the type of node that this will receive log data from. */ public enum SourceType { @@ -205,7 +205,6 @@ public enum SourceType FOLLOWER } - private final ClusterBackup.Context ctx; private final AgentInvoker agentInvoker; private final AgentRunner agentRunner; @@ -542,7 +541,7 @@ public enum ReplayStart public static final String CLUSTER_INITIAL_REPLAY_START_PROP_NAME = "cluster.backup.initial.replay.start"; /** - * Get the initial value for the cluster relay start + * Get the initial value for the cluster relay start. * * @return enum to determine where to start replaying the log from. * @see #CLUSTER_INITIAL_REPLAY_START_PROP_NAME @@ -1849,7 +1848,7 @@ public Context sourceType(final SourceType sourceType) } /** - * Get the currently configured source type + * Get the currently configured source type. * * @return source type for this backup instance. * @throws IllegalArgumentException if the configured source type is not one of {@link SourceType} diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupEventsListener.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupEventsListener.java index f70d21511c..9166c4e73b 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupEventsListener.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupEventsListener.java @@ -37,8 +37,8 @@ public interface ClusterBackupEventsListener /** * Backup response was received for a backup query. * - * @param clusterMembers in the backup response. - * @param logSourceMember to be used to replicate data from. + * @param clusterMembers in the backup response. + * @param logSourceMember to be used to replicate data from. * @param snapshotsToRetrieve snapshots to be retrieved. */ void onBackupResponse( @@ -47,17 +47,17 @@ void onBackupResponse( /** * Updated recording log. * - * @param recordingLog that was updated. + * @param recordingLog that was updated. * @param snapshotsRetrieved the snapshots that were retrieved. */ void onUpdatedRecordingLog(RecordingLog recordingLog, List snapshotsRetrieved); /** - * Update to the live log position as recorded to the local archive + * Update to the live log position as recorded to the local archive. * - * @param recordingId of the live log. + * @param recordingId of the live log. * @param recordingPosCounterId {@link io.aeron.archive.status.RecordingPos} counter id for the live log. - * @param logPosition of the live log. + * @param logPosition of the live log. */ void onLiveLogProgress(long recordingId, long recordingPosCounterId, long logPosition); } diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterTool.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterTool.java index a793c1a241..f5dfdb44ce 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterTool.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterTool.java @@ -109,7 +109,7 @@ public class ClusterTool AERON_CLUSTER_TOOL_REPLAY_STREAM_ID_PROP_NAME, AERON_CLUSTER_TOOL_REPLAY_STREAM_ID_DEFAULT); /** - * timeout in milliseconds used by the tool + * Timeout in milliseconds used by the tool for operations. */ public static final long TIMEOUT_MS = NANOSECONDS.toMillis(getDurationInNanos(AERON_CLUSTER_TOOL_TIMEOUT_PROP_NAME, 0)); @@ -378,7 +378,7 @@ public static void describe(final PrintStream out, final ClusterMarkFile[] servi } /** - * Determine if the given node is a leader + * Determine if a given node is a leader. * * @param out to print the output to. * @param clusterDir where the cluster is running. diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolCommand.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolCommand.java index 990323c03b..bd73f1c7ae 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolCommand.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolCommand.java @@ -33,9 +33,9 @@ public final class ClusterToolCommand { /** - * convenience method to ignore failure exit status + * Convenience method to ignore failure exit status. * - * @param actual actual action + * @param actual actual action. * @return SUCCESS */ public static Action ignoreFailures(final Action actual) @@ -48,9 +48,9 @@ public static Action ignoreFailures(final Action actual) } /** - * convenience method for actions that do not require extra args + * Convenience method for actions that do not require extra args. * - * @param actual actual action + * @param actual actual action. * @return SUCCESS */ public static Action action(final ToIntBiFunction actual) @@ -59,10 +59,10 @@ public static Action action(final ToIntBiFunction actual) } /** - * print help for a tool with the specified commands + * Print help for a tool with the specified commands. * - * @param commands map of commands by name - * @param prefix usage description prefix + * @param commands map of commands by name. + * @param prefix usage description prefix. */ public static void printHelp(final Map commands, final String prefix) { @@ -83,10 +83,10 @@ public static void printHelp(final Map commands, fin private final String description; /** - * constructor + * Constructor. * - * @param action action to perform for command - * @param description description of command + * @param action action to perform for command. + * @param description description of command. */ public ClusterToolCommand(final Action action, final String description) { @@ -95,10 +95,10 @@ public ClusterToolCommand(final Action action, final String description) } /** - * convenience method for actions that only require the cluster directory + * Convenience method for actions that only require the cluster directory. * - * @param actual actual action - * @return SUCCESS + * @param actual actual action. + * @return SUCCESS. */ public static Action action(final ToIntFunction actual) { @@ -106,7 +106,7 @@ public static Action action(final ToIntFunction actual) } /** - * @return description of command + * @return description of command. */ public String describe() { @@ -114,7 +114,7 @@ public String describe() } /** - * @return the actual action to perform when given the command + * @return the actual action to perform when given the command. */ public Action action() { @@ -122,18 +122,18 @@ public Action action() } /** - * Functional interface of an cluster tool operator action used in {@link ClusterToolCommand} + * Functional interface of a cluster tool operator action used in {@link ClusterToolCommand}. */ @FunctionalInterface public interface Action { /** - * An action for an operator tool to control cluster + * An action for an operator tool to control cluster. * - * @param clusterDir local cluster directory - * @param out Where to print the output - * @param args args to tool - * @return exit value + * @param clusterDir local cluster directory. + * @param out Where to print the output. + * @param args args to tool. + * @return exit value. */ int act(File clusterDir, PrintStream out, String[] args); } diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolOperator.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolOperator.java index 1bbfa99b83..508b20c2ff 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolOperator.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterToolOperator.java @@ -60,13 +60,14 @@ /** * Actions for an operator tool to control cluster. - * This class is used by {@link ClusterTool} by Aeron but also allows to be used / extended by other tools + * This class is used by {@link ClusterTool} by Aeron but also allows to be used / extended by other tools. + * * @see ClusterTool */ public class ClusterToolOperator { /** - * successful action return value = exist status + * Successful action return value = exist status. */ public static final int SUCCESS = 0; private static final int MARK_FILE_VERSION_WITH_CLUSTER_SERVICES_DIR = 1; @@ -77,11 +78,11 @@ public class ClusterToolOperator private final long timeoutMs; /** - * constructor + * Constructor. * - * @param toolChannel channel to use - * @param toolStreamId stream id to use - * @param timeoutMs timeout in milliseconds + * @param toolChannel channel to use. + * @param toolStreamId stream id to use. + * @param timeoutMs timeout in milliseconds. */ protected ClusterToolOperator( final String toolChannel, @@ -98,7 +99,7 @@ protected ClusterToolOperator( * * @param out to print the output to. * @param clusterDir where the cluster is running. - * @return exit status + * @return exit status. */ protected int pid(final File clusterDir, final PrintStream out) { @@ -421,7 +422,7 @@ protected void describe(final PrintStream out, final ClusterMarkFile[] serviceMa } /** - * Determine if the given node is a leader + * Determine if the given node is a leader. * * @param clusterDir where the cluster is running. * @param out to print the output to. @@ -740,8 +741,8 @@ protected int invalidateLatestSnapshot(final File clusterDir, final PrintStream /** * Print out a summary of the state captured in the latest consensus module snapshot. * - * @param clusterDir where the cluster is running. - * @param out where to print the operation result. + * @param clusterDir where the cluster is running. + * @param out where to print the operation result. * @return SUCCESS is the operation was successfully requested, else FAILURE */ protected int describeLatestConsensusModuleSnapshot( @@ -757,9 +758,9 @@ protected int describeLatestConsensusModuleSnapshot( /** * Print out a summary of the state captured in the latest consensus module snapshot. * - * @param clusterDir where the cluster is running. - * @param out where to print the operation result. - * @param postConsensusImageDescriber describing of image after consensus module state + * @param clusterDir where the cluster is running. + * @param out where to print the operation result. + * @param postConsensusImageDescriber describing of image after consensus module state * @return SUCCESS is the operation was successfully requested, else FAILURE */ protected int describeLatestConsensusModuleSnapshot( @@ -1127,8 +1128,6 @@ protected int describeClusterMarkFile(final File clusterDir, final PrintStream o return SUCCESS; } - ///////////////////////////////////////////////////////////////////////// - File resolveClusterServicesDir(final File clusterDir, final MarkFileHeaderDecoder decoder) { final File clusterServicesDir; @@ -1304,7 +1303,7 @@ File resolveDirectoryFromLinkFile(final File linkFile) } /** - * @return channel to use + * @return channel to use. */ protected String toolChannel() { @@ -1312,7 +1311,7 @@ protected String toolChannel() } /** - * @return stream id to use + * @return stream id to use. */ protected int toolStreamId() { @@ -1320,7 +1319,7 @@ protected int toolStreamId() } /** - * @return timeout in milliseconds to use + * @return timeout in milliseconds to use. */ protected long timeoutMs() { diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusControlState.java b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusControlState.java index 63ca105252..13eef0cd8a 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusControlState.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusControlState.java @@ -32,12 +32,12 @@ public final class ConsensusControlState private final String leaderLocalLogChannel; /** - * record constructor + * Record constructor. * - * @param logPublication publication or null - * @param logRecordingId log recording id - * @param leadershipTermId leadership term id - * @param leaderLocalLogChannel leader local log channel or null + * @param logPublication publication or null. + * @param logRecordingId log recording id. + * @param leadershipTermId leadership term id. + * @param leaderLocalLogChannel leader local log channel or null. */ ConsensusControlState( final ExclusivePublication logPublication, @@ -52,7 +52,7 @@ public final class ConsensusControlState } /** - * @return true iff we are the leader (and have the log publication) + * @return true iff we are the leader (and have the log publication). */ public boolean isLeader() { @@ -60,7 +60,7 @@ public boolean isLeader() } /** - * @return log publication or null if follower + * @return log publication or null if follower. */ public ExclusivePublication logPublication() { @@ -68,7 +68,7 @@ public ExclusivePublication logPublication() } /** - * @return log recording id + * @return log recording id. */ public long logRecordingId() { @@ -76,7 +76,7 @@ public long logRecordingId() } /** - * @return leadership term id + * @return leadership term id. */ public long leadershipTermId() { diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java index 00d53a8338..27e3be76c6 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java @@ -83,7 +83,7 @@ public final class ConsensusModule implements AutoCloseable { /** - * Default set of flags when taking a snapshot + * Default set of flags when taking a snapshot. */ public static final int CLUSTER_ACTION_FLAGS_DEFAULT = 0; @@ -939,7 +939,7 @@ public static final class Configuration "aeron.cluster.replication.progress.interval"; /** - * Property name of enabling the acceptance of standby snapshots + * Property name of enabling the acceptance of standby snapshots. */ @Config(defaultType = DefaultType.BOOLEAN, defaultBoolean = false) public static final String CLUSTER_ACCEPT_STANDBY_SNAPSHOTS_PROP_NAME = @@ -4218,7 +4218,7 @@ public Context nameResolver(final NameResolver ignore) } /** - * Indicate whether this node should accept snapshots from standby nodes + * Indicate whether this node should accept snapshots from standby nodes. * * @return true if this node should accept snapshots from standby nodes, false * otherwise. @@ -4232,7 +4232,7 @@ public boolean acceptStandbySnapshots() } /** - * Indicate whether this node should accept snapshots from standby nodes + * Indicate whether this node should accept snapshots from standby nodes. * * @param acceptStandbySnapshots true if this node should accept snapshots from standby nodes, * false otherwise. diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModuleExtension.java b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModuleExtension.java index f0360fc322..b1b3536f6d 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModuleExtension.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModuleExtension.java @@ -67,14 +67,14 @@ public interface ConsensusModuleExtension extends AutoCloseable * Cluster election is complete and new publication is added for the leadership term. If the node is a follower * then the publication will be null. * - * @param consensusControlState state to allow extension to control the consensus module + * @param consensusControlState state to allow extension to control the consensus module. */ void onElectionComplete(ConsensusControlState consensusControlState); /** - * New Leadership term and the consensus control state has changed + * New Leadership term and the consensus control state has changed. * - * @param consensusControlState state to allow extension to control the consensus module + * @param consensusControlState state to allow extension to control the consensus module. */ void onNewLeadershipTerm(ConsensusControlState consensusControlState); diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/PriorityHeapTimerServiceSupplier.java b/aeron-cluster/src/main/java/io/aeron/cluster/PriorityHeapTimerServiceSupplier.java index 1ef78d7825..41c8b59e8b 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/PriorityHeapTimerServiceSupplier.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/PriorityHeapTimerServiceSupplier.java @@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit; /** - * Supplies instances of the {@link PriorityHeapTimerService} + * Supplies instances of the {@link PriorityHeapTimerService}. */ public class PriorityHeapTimerServiceSupplier implements TimerServiceSupplier { diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/WheelTimerServiceSupplier.java b/aeron-cluster/src/main/java/io/aeron/cluster/WheelTimerServiceSupplier.java index f78d95f032..f041b2ead4 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/WheelTimerServiceSupplier.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/WheelTimerServiceSupplier.java @@ -20,7 +20,7 @@ import static org.agrona.BitUtil.findNextPositivePowerOfTwo; /** - * Supplies an instance of a {@link WheelTimerService} based on the configuration given to the constructor + * Supplies an instance of a {@link WheelTimerService} based on the configuration given to the constructor. */ public class WheelTimerServiceSupplier implements TimerServiceSupplier { diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java b/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java index 2b914b6cbe..796bac3ffb 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/client/AeronCluster.java @@ -233,9 +233,9 @@ public static AsyncConnect asyncConnect(final Context ctx) } /** - * an EgressListener for extension schemas + * An EgressListener for extension schemas. * - * @param listenerExtension listener extension + * @param listenerExtension listener extension. */ public void extendEgressListener(final EgressListenerExtension listenerExtension) { @@ -243,16 +243,15 @@ public void extendEgressListener(final EgressListenerExtension listenerExtension } /** - * a ControlledEgressListener for extension schemas + * A ControlledEgressListener for extension schemas. * - * @param listenerExtension listener extension + * @param listenerExtension listener extension. */ public void extendControlledEgressListener(final ControlledEgressListenerExtension listenerExtension) { this.controlledEgressListenerExtension = listenerExtension; } - /** * Close session and release associated resources. */ diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/client/EgressListenerExtension.java b/aeron-cluster/src/main/java/io/aeron/cluster/client/EgressListenerExtension.java index 8a6a13bd41..8e234cca7d 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/client/EgressListenerExtension.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/client/EgressListenerExtension.java @@ -18,7 +18,7 @@ import org.agrona.DirectBuffer; /** - * Interface for consuming messages coming from the cluster for an unknown schema + * Interface for consuming messages coming from the cluster for an unknown schema. */ @FunctionalInterface public interface EgressListenerExtension @@ -26,13 +26,13 @@ public interface EgressListenerExtension /** * Message of unknown schema to egress that can be handled by specific listener implementation. * - * @param actingBlockLength acting block length from header - * @param templateId template id - * @param schemaId schema id - * @param actingVersion acting version - * @param buffer message buffer - * @param offset message offset - * @param length message length + * @param actingBlockLength acting block length from header. + * @param templateId template id. + * @param schemaId schema id. + * @param actingVersion acting version. + * @param buffer message buffer. + * @param offset message offset. + * @param length message length. */ void onExtensionMessage( int actingBlockLength, diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusterMarkFile.java b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusterMarkFile.java index 1262e0d3cd..d731efaaff 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusterMarkFile.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusterMarkFile.java @@ -249,11 +249,11 @@ public File parentDirectory() } /** - * Determines if this path name matches the service mark file name pattern + * Determines if this path name matches the service mark file name pattern. * - * @param path to examine - * @param attributes ignored, only needed for BiPredicate signature matching - * @return true if the name matches + * @param path to examine. + * @param attributes ignored, only needed for BiPredicate signature matching. + * @return true if the name matches. */ public static boolean isServiceMarkFile(final Path path, final BasicFileAttributes attributes) { @@ -265,7 +265,7 @@ public static boolean isServiceMarkFile(final Path path, final BasicFileAttribut * Determines if this path name matches the consensus module file name pattern. * * @param path to examine. - * @param attributes ignored, only needed for BiPredicate signature matching, + * @param attributes ignored, only needed for BiPredicate signature matching. * @return true if the name matches. */ public static boolean isConsensusModuleMarkFile(final Path path, final BasicFileAttributes attributes) diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceContainer.java b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceContainer.java index c9c2aa33e5..0fe436cb9b 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceContainer.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/service/ClusteredServiceContainer.java @@ -1982,7 +1982,7 @@ public void deleteDirectory() } /** - * Indicates if this node should take standby snapshots + * Indicates if this node should take standby snapshots. * * @return true if this should take standby snapshots, false otherwise. * @see ClusteredServiceContainer.Configuration#STANDBY_SNAPSHOT_ENABLED_PROP_NAME @@ -1995,7 +1995,7 @@ public boolean standbySnapshotEnabled() } /** - * Indicates if this node should take standby snapshots + * Indicates if this node should take standby snapshots. * * @param standbySnapshotEnabled if this node should take standby snapshots. * @return this for a fluent API. diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/service/SnapshotDurationTracker.java b/aeron-cluster/src/main/java/io/aeron/cluster/service/SnapshotDurationTracker.java index 8492252944..fea08af4f7 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/service/SnapshotDurationTracker.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/service/SnapshotDurationTracker.java @@ -57,7 +57,7 @@ public AtomicCounter maxSnapshotDuration() } /** - * Get counter tracking number of times {@link SnapshotDurationTracker#durationThresholdNs} was exceeded + * Get counter tracking number of times {@link SnapshotDurationTracker#durationThresholdNs} was exceeded. * * @return duration threshold exceeded counter. */ diff --git a/aeron-driver/src/main/java/io/aeron/driver/Configuration.java b/aeron-driver/src/main/java/io/aeron/driver/Configuration.java index 15121e195b..a664b2011b 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/Configuration.java +++ b/aeron-driver/src/main/java/io/aeron/driver/Configuration.java @@ -425,7 +425,7 @@ public final class Configuration public static final String PUBLICATION_CONNECTION_TIMEOUT_PROP_NAME = "aeron.publication.connection.timeout"; /** - * Timeout for {@link Publication} connection timeout in nanoseconds + * Timeout for {@link Publication} connection timeout in nanoseconds. */ @Config( expectedCDefaultFieldName = "AERON_PUBLICATION_CONNECTION_TIMEOUT_NS_DEFAULT", diff --git a/aeron-driver/src/main/java/io/aeron/driver/DriverConductorProxy.java b/aeron-driver/src/main/java/io/aeron/driver/DriverConductorProxy.java index c0a2185331..cb7c2f2488 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/DriverConductorProxy.java +++ b/aeron-driver/src/main/java/io/aeron/driver/DriverConductorProxy.java @@ -160,7 +160,7 @@ public void closeReceiveDestinationIndicators(final ReceiveDestinationTransport } /** - * Handle a response setup message from the remote "server" + * Handle a response setup message from the remote "server". * * @param responseCorrelationId correlationId of the subscription that will handle responses. * @param responseSessionId sessionId that will be associated with the incoming messages. diff --git a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java index 012e3c90c6..e11a42271b 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java +++ b/aeron-driver/src/main/java/io/aeron/driver/MediaDriver.java @@ -70,7 +70,7 @@ import static org.agrona.concurrent.status.CountersReader.METADATA_LENGTH; /** - * Main class for JVM-based media driver + * Main class for JVM-based media driver. *

* Usage: * @@ -3551,7 +3551,7 @@ public Context nameResolverTimeTracker(final DutyCycleTracker dutyCycleTracker) } /** - * Wildcard port range used for the Sender + * Wildcard port range used for the Sender. * * @return port range as a string in the format "low high". */ @@ -3579,7 +3579,7 @@ public Context senderWildcardPortRange(final String portRange) } /** - * Wildcard port range used for the Receiver + * Wildcard port range used for the Receiver. * * @return port range as a string in the format "low high". */ @@ -3589,7 +3589,6 @@ public String receiverWildcardPortRange() return receiverWildcardPortRange; } - /** * Set the wildcard port range to be used for the Receiver. *

diff --git a/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControl.java b/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControl.java index 83dd32e00a..10c110ed52 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControl.java +++ b/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControl.java @@ -20,7 +20,7 @@ import static java.lang.System.getProperty; /** - * {@inheritDoc} + * {@inheritDoc}. * * @deprecated Use {@link TaggedMulticastFlowControl} instead */ diff --git a/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControlSupplier.java b/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControlSupplier.java index 0400073bd4..8a2f21b4e2 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControlSupplier.java +++ b/aeron-driver/src/main/java/io/aeron/driver/PreferredMulticastFlowControlSupplier.java @@ -19,9 +19,9 @@ /** * - * This has been replaced by {@link TaggedMulticastFlowControlSupplier} + * This has been replaced by {@link TaggedMulticastFlowControlSupplier}. * - * @deprecated Use {@link TaggedMulticastFlowControlSupplier} instead + * @deprecated Use {@link TaggedMulticastFlowControlSupplier} instead. */ @Deprecated public class PreferredMulticastFlowControlSupplier implements FlowControlSupplier diff --git a/aeron-driver/src/main/java/io/aeron/driver/RetransmitSender.java b/aeron-driver/src/main/java/io/aeron/driver/RetransmitSender.java index 26743d66e7..2fcd13288f 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/RetransmitSender.java +++ b/aeron-driver/src/main/java/io/aeron/driver/RetransmitSender.java @@ -16,7 +16,7 @@ package io.aeron.driver; /** - * Handler for sending a retransmit + * Handler for sending a retransmit. */ @FunctionalInterface public interface RetransmitSender diff --git a/aeron-driver/src/main/java/io/aeron/driver/SubscriptionLink.java b/aeron-driver/src/main/java/io/aeron/driver/SubscriptionLink.java index 6fd3ce6ce2..7e24bd6267 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/SubscriptionLink.java +++ b/aeron-driver/src/main/java/io/aeron/driver/SubscriptionLink.java @@ -23,7 +23,7 @@ import java.util.Map; /** - * Subscription registration from a client used for liveness tracking + * Subscription registration from a client used for liveness tracking. */ public abstract class SubscriptionLink implements DriverManagedResource { diff --git a/aeron-driver/src/main/java/io/aeron/driver/ext/RandomLossGenerator.java b/aeron-driver/src/main/java/io/aeron/driver/ext/RandomLossGenerator.java index 365fa899be..8f0b5e1be5 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/ext/RandomLossGenerator.java +++ b/aeron-driver/src/main/java/io/aeron/driver/ext/RandomLossGenerator.java @@ -31,7 +31,7 @@ public class RandomLossGenerator implements LossGenerator /** * Construct loss generator with given loss rate as percentage. * - * @param lossRate for generating loss + * @param lossRate for generating loss. */ public RandomLossGenerator(final double lossRate) { @@ -39,10 +39,10 @@ public RandomLossGenerator(final double lossRate) } /** - * Construct loss generator with given loss rate as percentage and random seed + * Construct loss generator with given loss rate as percentage and random seed. * - * @param lossRate for generating loss - * @param lossSeed for random seeding + * @param lossRate for generating loss. + * @param lossSeed for random seeding. */ public RandomLossGenerator(final double lossRate, final long lossSeed) { diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/PortManager.java b/aeron-driver/src/main/java/io/aeron/driver/media/PortManager.java index e27753d9c0..dfc564706a 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/PortManager.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/PortManager.java @@ -19,14 +19,14 @@ import java.net.InetSocketAddress; /** - * Interface for managing ports in use by UdpChannelTransports + * Interface for managing ports in use by UdpChannelTransports. */ public interface PortManager { /** - * Called before an OS bind to adjust the binded address and to notify of the bind for the port manager. + * Called before an OS bind to adjust the bound address and to notify of the bind for the port manager. * - * @param udpChannel for the UDP endpoint being bound. + * @param udpChannel for the UDP endpoint being bound. * @param bindAddress for the bind. * @return InetSocketAddress to use for the bind. * @throws BindException if the bind should not be performed. diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpoint.java b/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpoint.java index 32fc7f8069..f983ffa4e0 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpoint.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpoint.java @@ -929,7 +929,7 @@ public void sendRttMeasurement( } /** - * Send a response setup message + * Send a response setup message. * * @param controlAddresses of the sources. * @param sessionId for the image. diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpointThreadLocals.java b/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpointThreadLocals.java index 90b5a4960d..bf41dee354 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpointThreadLocals.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/ReceiveChannelEndpointThreadLocals.java @@ -190,9 +190,9 @@ public ByteBuffer responseSetupBuffer() } /** - * Flyweight over the {@link #responseSetupBuffer()} + * Flyweight over the {@link #responseSetupBuffer()}. * - * @return flyweight over the {@link #responseSetupBuffer()} + * @return flyweight over the {@link #responseSetupBuffer()}. */ public ResponseSetupFlyweight responseSetupHeader() { @@ -210,9 +210,9 @@ public ByteBuffer errorBuffer() } /** - * Flyweight over the {@link #errorBuffer()} + * Flyweight over the {@link #errorBuffer()}. * - * @return flyweight over the {@link #errorBuffer()} + * @return flyweight over the {@link #errorBuffer()}. */ public ErrorFlyweight errorFlyweight() { diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/UdpTransportPoller.java b/aeron-driver/src/main/java/io/aeron/driver/media/UdpTransportPoller.java index 58d8289075..6d45c32bc1 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/UdpTransportPoller.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/UdpTransportPoller.java @@ -21,7 +21,8 @@ import java.nio.channels.SelectionKey; /** - * Encapsulates the polling of a number of {@link UdpChannelTransport}s using whatever means provides the lowest latency. + * Encapsulates the polling of a number of {@link UdpChannelTransport}s using whatever means provides the + * lowest latency. */ public abstract class UdpTransportPoller extends TransportPoller { @@ -41,7 +42,7 @@ public UdpTransportPoller(final ErrorHandler errorHandler) } /** - * Explicit event loop processing as a poll + * Explicit event loop processing as a poll. * * @return the number of frames processed. */ diff --git a/aeron-driver/src/main/java/io/aeron/driver/status/FlowControlReceivers.java b/aeron-driver/src/main/java/io/aeron/driver/status/FlowControlReceivers.java index 555273855b..449edcfa24 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/status/FlowControlReceivers.java +++ b/aeron-driver/src/main/java/io/aeron/driver/status/FlowControlReceivers.java @@ -37,7 +37,7 @@ public class FlowControlReceivers public static final String NAME = "fc-receivers"; /** - * Allocate a new flow control receivers counter for a stream + * Allocate a new flow control receivers counter for a stream. * * @param tempBuffer to build the label. * @param countersManager to allocate the counter from. diff --git a/aeron-driver/src/main/java/io/aeron/driver/status/MdcDestinations.java b/aeron-driver/src/main/java/io/aeron/driver/status/MdcDestinations.java index d6d5a82791..e607295a2d 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/status/MdcDestinations.java +++ b/aeron-driver/src/main/java/io/aeron/driver/status/MdcDestinations.java @@ -37,7 +37,7 @@ public class MdcDestinations public static final String NAME = "mdc-num-dest"; /** - * Allocate a new MDC destinations counter for an endpoint + * Allocate a new MDC destinations counter for an endpoint. * * @param tempBuffer to build the label. * @param countersManager to allocate the counter from. diff --git a/aeron-samples/src/main/java/io/aeron/samples/RateReporter.java b/aeron-samples/src/main/java/io/aeron/samples/RateReporter.java index e9aa92701e..3e9814d447 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/RateReporter.java +++ b/aeron-samples/src/main/java/io/aeron/samples/RateReporter.java @@ -51,7 +51,7 @@ class RateReporterRhsPadding extends RateReporterValues public final class RateReporter extends RateReporterRhsPadding implements Runnable { /** - * Interface for reporting of rate information + * Interface for reporting of rate information. */ @FunctionalInterface public interface Reporter @@ -59,10 +59,10 @@ public interface Reporter /** * Called for a rate report. * - * @param messagesPerSec since last report - * @param bytesPerSec since last report - * @param totalMessages since beginning of reporting - * @param totalBytes since beginning of reporting + * @param messagesPerSec since last report. + * @param bytesPerSec since last report. + * @param totalMessages since beginning of reporting. + * @param totalBytes since beginning of reporting. */ void onReport(double messagesPerSec, double bytesPerSec, long totalMessages, long totalBytes); } @@ -78,8 +78,8 @@ public interface Reporter /** * Create a rate reporter with the given report interval in nanoseconds and the reporting function. * - * @param reportInterval in nanoseconds - * @param reportingFunc to call for reporting rates + * @param reportInterval in nanoseconds. + * @param reportingFunc to call for reporting rates. */ public RateReporter(final long reportInterval, final Reporter reportingFunc) { @@ -90,7 +90,7 @@ public RateReporter(final long reportInterval, final Reporter reportingFunc) } /** - * Run loop for the rate reporter + * Run loop for the rate reporter. */ public void run() { diff --git a/aeron-samples/src/main/java/io/aeron/samples/archive/RecordingDescriptor.java b/aeron-samples/src/main/java/io/aeron/samples/archive/RecordingDescriptor.java index bd8836a321..3a1f3b4e55 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/archive/RecordingDescriptor.java +++ b/aeron-samples/src/main/java/io/aeron/samples/archive/RecordingDescriptor.java @@ -20,7 +20,7 @@ /** * Class that collects the parameters of the RecordingDescriptor Consumer callback for use with the - * RecordingDescriptorCollector + * RecordingDescriptorCollector. * * @see io.aeron.archive.client.RecordingDescriptorConsumer * @see RecordingDescriptorCollector @@ -156,7 +156,7 @@ public long stopTimestamp() } /** - * startPosition of the recording against the recorded publication, the {@link Image#joinPosition()} + * startPosition of the recording against the recorded publication, the {@link Image#joinPosition()}. * * @return startPosition */ @@ -237,6 +237,7 @@ public int streamId() /** * strippedChannel of the recorded stream which is used for the recording subscription in the archive. + * * @return strippedChannel */ public String strippedChannel() diff --git a/aeron-samples/src/main/java/io/aeron/samples/echo/EchoPair.java b/aeron-samples/src/main/java/io/aeron/samples/echo/EchoPair.java index 65229e7d0c..099d970bf6 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/echo/EchoPair.java +++ b/aeron-samples/src/main/java/io/aeron/samples/echo/EchoPair.java @@ -45,9 +45,10 @@ public class EchoPair implements ControlledFragmentHandler, AutoCloseable /** * Construct the echo pair. - * @param correlationId user supplied correlation id - * @param subscription to read fragments from - * @param publication to send fragments back to + * + * @param correlationId user supplied correlation id. + * @param subscription to read fragments from. + * @param publication to send fragments back to. */ public EchoPair(final long correlationId, final Subscription subscription, final Publication publication) { @@ -98,7 +99,7 @@ else if (Publication.MAX_POSITION_EXCEEDED == offerPosition) /** * Poll subscription of the echo pair. * - * @return number of fragments processed + * @return number of fragments processed. */ public int poll() { @@ -106,8 +107,9 @@ public int poll() } /** - * Get the correlationId - * @return user supplied correlationId + * Get the correlationId. + * + * @return user supplied correlationId. */ public long correlationId() { @@ -125,7 +127,7 @@ public EchoMonitorMBean monitor() } /** - * Close the echo pair + * Close the echo pair. */ public void close() { @@ -135,8 +137,9 @@ public void close() private final class EchoMonitor implements EchoMonitorMBean { /** - * Get the correaltionId - * @return correlationId + * Get the correlationId. + * + * @return correlationId. */ public long getCorrelationId() { @@ -146,7 +149,7 @@ public long getCorrelationId() /** * Number of times echo pair has experienced back pressure when copying to the publication. * - * @return number of back pressure events + * @return number of back pressure events. */ public long getBackPressureCount() { @@ -156,7 +159,7 @@ public long getBackPressureCount() /** * Number of fragments processed. * - * @return number of fragments + * @return number of fragments. */ public long getFragmentCount() { @@ -164,7 +167,7 @@ public long getFragmentCount() } /** - * Number of bytes processed + * Number of bytes processed. * * @return number of bytes. */ diff --git a/aeron-samples/src/main/java/io/aeron/samples/echo/ProvisioningServerMain.java b/aeron-samples/src/main/java/io/aeron/samples/echo/ProvisioningServerMain.java index 5811690c57..5e5ee38210 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/echo/ProvisioningServerMain.java +++ b/aeron-samples/src/main/java/io/aeron/samples/echo/ProvisioningServerMain.java @@ -32,7 +32,7 @@ import static java.util.Objects.requireNonNull; /** - * Main class for starting the provisioning service + * Main class for starting the provisioning service. */ public final class ProvisioningServerMain implements Agent, AutoCloseable { @@ -53,7 +53,7 @@ private ProvisioningServerMain(final MediaDriver driver, final Aeron aeron) /** * Entry point for starting the provisioning service. * - * @param args command line arguments + * @param args command line arguments. */ @SuppressWarnings("try") public static void main(final String[] args) @@ -68,10 +68,10 @@ public static void main(final String[] args) } /** - * Launch the provisioning server + * Launch the provisioning server. * - * @param context Aeron client context to connect to the local media driver - * @return new ProvisionServerMain instance + * @param context Aeron client context to connect to the local media driver. + * @return new ProvisionServerMain instance. */ public static ProvisioningServerMain launch(final Aeron.Context context) { @@ -140,6 +140,7 @@ public void close() { } } + CloseHelper.quietCloseAll(runner, aeron, driver); } } diff --git a/aeron-samples/src/main/java/io/aeron/samples/echo/api/ProvisioningConstants.java b/aeron-samples/src/main/java/io/aeron/samples/echo/api/ProvisioningConstants.java index a41535b501..db572f010a 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/echo/api/ProvisioningConstants.java +++ b/aeron-samples/src/main/java/io/aeron/samples/echo/api/ProvisioningConstants.java @@ -16,25 +16,25 @@ package io.aeron.samples.echo.api; /** - * Constants used by the provisioning API + * Constants used by the provisioning API. */ public class ProvisioningConstants { /** - * TODO + * TODO. */ public static final String IO_AERON_TYPE_PROVISIONING_NAME_TESTING = "io.aeron:type=Provisioning,name=testing"; /** - * TODO + * TODO. */ public static final String IO_AERON_TYPE_ECHO_PAIR_PREFIX = "io.aeron:type=EchoPair,name="; /** * Generate MBean echo pair object name from the specified correlationId. * - * @param correlationId user defined correlationId - * @return a legal JMX object name + * @param correlationId user defined correlationId. + * @return a legal JMX object name. */ public static String echoPairObjectName(final long correlationId) { diff --git a/aeron-samples/src/main/java/io/aeron/samples/security/SimpleAuthenticator.java b/aeron-samples/src/main/java/io/aeron/samples/security/SimpleAuthenticator.java index 5a1ab80f4d..2b6144bb96 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/security/SimpleAuthenticator.java +++ b/aeron-samples/src/main/java/io/aeron/samples/security/SimpleAuthenticator.java @@ -92,7 +92,7 @@ public void onChallengedSession(final SessionProxy sessionProxy, final long nowM } /** - * Builder to create instances of SimpleAuthenticator + * Builder to create instances of SimpleAuthenticator. */ public static class Builder { @@ -109,8 +109,8 @@ public static class Builder * .newInstance(); * * - * @param encodedPrincipal principal encoded as a byte array. - * @param encodedCredentials credentials encoded as a byte array. + * @param encodedPrincipal principal encoded as a byte array. + * @param encodedCredentials credentials encoded as a byte array. * @return this for a fluent API. */ public Builder principal(final byte[] encodedPrincipal, final byte[] encodedCredentials) diff --git a/aeron-samples/src/main/java/io/aeron/samples/stress/CRC64.java b/aeron-samples/src/main/java/io/aeron/samples/stress/CRC64.java index b977c91f06..27c031895e 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/stress/CRC64.java +++ b/aeron-samples/src/main/java/io/aeron/samples/stress/CRC64.java @@ -132,7 +132,7 @@ private static void test(final byte[] b, final int len, final long crcValue) thr } /** - * Entry point + * Entry point. * * @param args command line args. * @throws Exception on failure. diff --git a/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcClient.java b/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcClient.java index c6dfd1dc89..6ee2e8c4a8 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcClient.java +++ b/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcClient.java @@ -76,7 +76,7 @@ public class StressMdcClient implements Agent private Counter clientSendCount; /** - * Construct Stress Client + * Construct Stress Client. * * @param serverAddress server address to connect to. * @param clientAddress local address to get responses. diff --git a/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcServer.java b/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcServer.java index d501c80362..6581b64b54 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcServer.java +++ b/aeron-samples/src/main/java/io/aeron/samples/stress/StressMdcServer.java @@ -158,7 +158,8 @@ public void onClose() } /** - * Entry point + * Entry point. + * * @param args command line args. */ public static void main(final String[] args) diff --git a/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastClient.java b/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastClient.java index be095ddcfa..382ce37dc5 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastClient.java +++ b/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastClient.java @@ -72,13 +72,14 @@ public class StressUnicastClient implements Agent private long lastMessageSent = 0; /** - * Construct Stress Client - * @param serverAddress server address to connect to. - * @param clientAddress local address to get responses. - * @param clock for timing. - * @param maxInflight maximum number of messages in flight. - * @param totalToSend total number of messages to send. - * @param mtu the mtu to use. + * Construct Stress Client. + * + * @param serverAddress server address to connect to. + * @param clientAddress local address to get responses. + * @param clock for timing. + * @param maxInflight maximum number of messages in flight. + * @param totalToSend total number of messages to send. + * @param mtu the mtu to use. */ public StressUnicastClient( final String serverAddress, @@ -172,7 +173,6 @@ private void unicastRspHandler( inflightMessages.remove(correlationId); } - private long currentCorrelationId(final DirectBuffer message, final int offset, final int length) { return correlationId; diff --git a/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastServer.java b/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastServer.java index 92e72ca6e9..745fd7355e 100644 --- a/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastServer.java +++ b/aeron-samples/src/main/java/io/aeron/samples/stress/StressUnicastServer.java @@ -129,7 +129,8 @@ public void onClose() } /** - * Entry point + * Entry point. + * * @param args command line args. */ public static void main(final String[] args) diff --git a/aeron-test-support/src/main/java/io/aeron/test/DataCollector.java b/aeron-test-support/src/main/java/io/aeron/test/DataCollector.java index ea1309d695..9b56951f2f 100644 --- a/aeron-test-support/src/main/java/io/aeron/test/DataCollector.java +++ b/aeron-test-support/src/main/java/io/aeron/test/DataCollector.java @@ -80,7 +80,7 @@ public void add(final Path location) } /** - * Add a file/directory to be preserved. Converting from a File to a Path if not null. + * Add a file/directory to be preserved. Converting from a File to a Path if not null. * * @param location file or directory to preserve. * @see #dumpData(String, byte[]) @@ -148,7 +148,7 @@ Path dumpData(final String destinationDir, final byte[] threadDump) } /** - * Find all the driver cnc files + * Find all the driver cnc files. * * @return list of paths to collected driver cnc files. */ @@ -160,8 +160,8 @@ public List cncFiles() /** * Find all mark files for specific dissector. * - * @param dissector to use as a filter - * @return list of paths to the associated mark files + * @param dissector to use as a filter. + * @return list of paths to the associated mark files. */ public List markFiles(final SystemTestWatcher.MarkFileDissector dissector) { @@ -260,8 +260,7 @@ public void captureAllFiles() /** * Add a specific exclusion for a file to be captured. * - * @param fileExclusion predicate that returns true of a specific file should - * not be captured. + * @param fileExclusion predicate that returns true of a specific file should not be captured. */ public void addFileExclusion(final Predicate fileExclusion) { @@ -444,7 +443,7 @@ private void copyFiles(final Path src, final Path dst) throws IOException { Files.walkFileTree( src, - new SimpleFileVisitor() + new SimpleFileVisitor<>() { public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attrs) throws IOException diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index c17d4c8a04..e40fde1022 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -39,6 +39,7 @@ +