You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2025/02/26 18:41:14 UTC
(activemq-artemis) branch main updated (3da715a6ef -> 5b12277994)
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
from 3da715a6ef ARTEMIS-5331 bump slf4j.version from 2.0.16 to 2.0.17
new 003063aee6 ARTEMIS-5315 remove unnecessary InetAddresses code
new 8eb52efadd NO-JIRA remove dead code with invalid JavaDoc
new 5b12277994 ARTEMIS-5314 overhaul JavaDoc formatting & content
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/activemq/artemis/boot/Artemis.java | 5 +-
.../configuration/ArtemisClientConfiguration.java | 16 +-
.../org/apache/activemq/artemis/cli/Artemis.java | 18 +-
.../artemis/cli/commands/ActionAbstract.java | 16 +-
.../artemis/cli/commands/Configurable.java | 2 +-
.../artemis/cli/commands/InputAbstract.java | 5 +-
.../apache/activemq/artemis/cli/commands/Run.java | 8 +-
.../artemis/cli/commands/helper/HelperCreate.java | 10 +-
.../messages/perf/AsyncJms2ProducerFacade.java | 4 +-
.../messages/perf/PaddingDecimalFormat.java | 4 +-
.../artemis/cli/commands/tools/PrintData.java | 6 -
.../cli/commands/tools/xml/XMLMessageExporter.java | 4 +-
.../cli/commands/tools/xml/XMLMessageImporter.java | 9 +-
.../cli/commands/tools/xml/XmlDataConstants.java | 4 +-
.../cli/commands/tools/xml/XmlDataExporter.java | 14 +-
.../cli/commands/tools/xml/XmlDataImporter.java | 20 +-
.../artemis/cli/commands/user/AddUser.java | 2 +-
.../artemis/cli/commands/user/RemoveUser.java | 2 +
.../artemis/cli/commands/user/ResetUser.java | 2 +
.../artemis/cli/commands/util/SyncCalculation.java | 18 +-
.../artemis/cli/process/ProcessBuilder.java | 4 -
.../activemq/artemis/integration/FileBroker.java | 8 +-
.../apache/activemq/artemis/util/ServerUtil.java | 13 +-
.../activemq/artemis/cli/commands/CreateTest.java | 2 +-
.../org/apache/activemq/cli/test/ArtemisTest.java | 4 +-
.../activemq/artemis/api/core/ActiveMQBuffer.java | 743 +++++++++------------
.../activemq/artemis/api/core/ActiveMQBuffers.java | 4 +-
.../artemis/api/core/ActiveMQException.java | 6 +-
.../api/core/ActiveMQIllegalStateException.java | 4 +-
...ActiveMQInterceptorRejectedPacketException.java | 1 -
.../ActiveMQLargeMessageInterruptedException.java | 3 -
.../artemis/api/core/ActiveMQNativeIOError.java | 1 -
.../api/core/ActiveMQObjectClosedException.java | 3 +-
.../core/ActiveMQRemoteDisconnectException.java | 2 +-
.../core/ActiveMQReplicationTimeooutException.java | 4 +-
.../api/core/ActiveMQSecurityException.java | 2 +-
.../api/core/ActiveMQSessionCreationException.java | 4 +-
.../artemis/api/core/ParameterisedAddress.java | 20 +-
.../artemis/api/core/QueueConfiguration.java | 42 +-
.../activemq/artemis/api/core/SimpleString.java | 62 +-
.../artemis/core/persistence/Persister.java | 10 +-
.../artemis/core/persistence/PersisterIDs.java | 11 +-
.../core/server/ActiveMQScheduledComponent.java | 50 +-
.../artemis/core/server/NetworkHealthCheck.java | 6 +-
.../apache/activemq/artemis/json/JsonArray.java | 101 +--
.../apache/activemq/artemis/json/JsonNumber.java | 5 +-
.../apache/activemq/artemis/json/JsonObject.java | 41 +-
.../activemq/artemis/json/JsonObjectBuilder.java | 96 +--
.../apache/activemq/artemis/json/JsonValue.java | 1 -
.../apache/activemq/artemis/logs/AuditLogger.java | 21 +-
.../artemis/utils/AbstractByteBufPool.java | 18 +-
.../activemq/artemis/utils/AbstractPool.java | 8 +-
.../artemis/utils/ActiveMQThreadFactory.java | 12 +-
.../activemq/artemis/utils/ArtemisCloseable.java | 4 +-
.../activemq/artemis/utils/AutomaticLatch.java | 10 +-
.../apache/activemq/artemis/utils/ByteUtil.java | 17 +-
.../activemq/artemis/utils/ClassloadingUtil.java | 5 +-
.../activemq/artemis/utils/ConcurrentUtil.java | 3 +-
.../artemis/utils/DefaultSensitiveStringCodec.java | 20 +-
.../org/apache/activemq/artemis/utils/Env.java | 14 +-
.../activemq/artemis/utils/FactoryFinder.java | 18 +-
.../apache/activemq/artemis/utils/FileUtil.java | 6 +-
.../activemq/artemis/utils/HashProcessor.java | 6 +-
.../apache/activemq/artemis/utils/IPV6Util.java | 3 +-
.../activemq/artemis/utils/InetAddresses.java | 390 +----------
.../apache/activemq/artemis/utils/JsonLoader.java | 4 +-
.../artemis/utils/PasswordMaskingUtil.java | 33 +-
.../apache/activemq/artemis/utils/PendingTask.java | 5 +-
.../activemq/artemis/utils/PowerOf2Util.java | 12 +-
.../activemq/artemis/utils/Preconditions.java | 27 +-
.../apache/activemq/artemis/utils/RandomUtil.java | 6 +-
.../activemq/artemis/utils/ReferenceCounter.java | 6 +-
.../artemis/utils/ReferenceCounterUtil.java | 4 +-
.../activemq/artemis/utils/ReusableLatch.java | 29 +-
.../activemq/artemis/utils/SelectorTranslator.java | 16 +-
.../activemq/artemis/utils/SensitiveDataCodec.java | 4 +-
.../activemq/artemis/utils/SizeAwareMetric.java | 4 +-
.../activemq/artemis/utils/SpawnedVMSupport.java | 35 +-
.../activemq/artemis/utils/StringEscapeUtils.java | 7 +-
.../apache/activemq/artemis/utils/Suppliers.java | 19 +-
.../apache/activemq/artemis/utils/TimeUtils.java | 3 -
.../apache/activemq/artemis/utils/UTF8Util.java | 2 +-
.../org/apache/activemq/artemis/utils/UUID.java | 58 +-
.../activemq/artemis/utils/UUIDGenerator.java | 24 +-
.../apache/activemq/artemis/utils/UUIDTimer.java | 166 ++---
.../org/apache/activemq/artemis/utils/Waiter.java | 6 +-
.../artemis/utils/actors/ArtemisExecutor.java | 31 +-
.../activemq/artemis/utils/actors/HandlerBase.java | 11 +-
.../artemis/utils/actors/OrderedExecutor.java | 6 +-
.../utils/actors/OrderedExecutorFactory.java | 5 +-
.../artemis/utils/actors/ProcessorBase.java | 29 +-
.../activemq/artemis/utils/bean/MetaBean.java | 32 +-
.../utils/collections/ArrayResettableIterator.java | 6 +-
.../ConcurrentAppendOnlyChunkedList.java | 17 +-
.../utils/collections/ConcurrentHashSet.java | 2 +-
.../utils/collections/ConcurrentLongHashMap.java | 4 +-
.../utils/collections/ConcurrentLongHashSet.java | 3 +-
.../artemis/utils/collections/LinkedList.java | 8 +-
.../artemis/utils/collections/LinkedListImpl.java | 26 +-
.../utils/collections/LinkedListIterator.java | 7 +-
.../artemis/utils/collections/LongHashSet.java | 35 +-
.../utils/collections/MultiResettableIterator.java | 4 +-
.../artemis/utils/collections/NoOpMap.java | 6 +-
.../artemis/utils/collections/NodeStore.java | 17 +-
.../utils/collections/PriorityCollection.java | 10 +-
.../utils/collections/PriorityLinkedList.java | 16 +-
.../utils/collections/ResettableIterator.java | 4 +-
.../utils/collections/SparseArrayLinkedList.java | 19 +-
.../artemis/utils/collections/TypedProperties.java | 9 +-
.../utils/collections/UpdatableIterator.java | 15 +-
.../utils/critical/CriticalAnalyzerImpl.java | 3 +-
.../artemis/utils/critical/CriticalCloseable.java | 13 +-
.../artemis/utils/critical/CriticalComponent.java | 14 +-
.../utils/critical/CriticalComponentImpl.java | 4 +-
.../activemq/artemis/utils/pools/MpscPool.java | 9 +-
.../apache/activemq/artemis/utils/pools/Pool.java | 9 +-
.../activemq/artemis/utils/uri/URIFactory.java | 18 +-
.../activemq/artemis/utils/uri/URISchema.java | 7 +-
.../activemq/artemis/utils/uri/URISupport.java | 91 ++-
.../activemq/artemis/utils/URIParserTest.java | 8 -
.../artemis/utils/actors/ThresholdActorTest.java | 5 +-
.../artemis/utils/collections/LongHashSetTest.java | 5 +-
.../api/config/ActiveMQDefaultConfiguration.java | 116 ++--
.../activemq/artemis/api/core/BaseInterceptor.java | 5 +-
.../artemis/api/core/BroadcastEndpoint.java | 30 +-
.../api/core/BroadcastGroupConfiguration.java | 4 +-
.../api/core/ChannelBroadcastEndpointFactory.java | 2 +-
.../api/core/DiscoveryGroupConfiguration.java | 27 +-
.../activemq/artemis/api/core/FilterConstants.java | 4 +-
.../activemq/artemis/api/core/ICoreMessage.java | 42 +-
.../activemq/artemis/api/core/Interceptor.java | 6 +-
.../artemis/api/core/JGroupsBroadcastEndpoint.java | 6 +-
.../api/core/JGroupsChannelBroadcastEndpoint.java | 2 +-
.../apache/activemq/artemis/api/core/Message.java | 279 +++++---
.../activemq/artemis/api/core/RefCountMessage.java | 40 +-
.../artemis/api/core/RefCountMessageListener.java | 3 +-
.../artemis/api/core/TransportConfiguration.java | 45 +-
.../api/core/TrustManagerFactoryPlugin.java | 3 +-
.../api/core/UDPBroadcastEndpointFactory.java | 5 +-
.../artemis/api/core/client/ActiveMQClient.java | 105 ++-
.../artemis/api/core/client/ClientConsumer.java | 50 +-
.../artemis/api/core/client/ClientMessage.java | 48 +-
.../artemis/api/core/client/ClientProducer.java | 88 +--
.../artemis/api/core/client/ClientRequestor.java | 19 +-
.../artemis/api/core/client/ClientSession.java | 485 +++++++-------
.../api/core/client/ClientSessionFactory.java | 90 +--
.../api/core/client/ClusterTopologyListener.java | 14 +-
.../api/core/client/FailoverEventListener.java | 3 +-
.../artemis/api/core/client/MessageHandler.java | 4 +-
.../core/client/SendAcknowledgementHandler.java | 24 +-
.../artemis/api/core/client/ServerLocator.java | 323 +++++----
.../api/core/client/SessionFailureListener.java | 2 +-
.../artemis/api/core/client/TopologyMember.java | 42 +-
.../RandomConnectionLoadBalancingPolicy.java | 4 +-
.../RandomStickyConnectionLoadBalancingPolicy.java | 3 +-
.../RoundRobinConnectionLoadBalancingPolicy.java | 7 +-
.../artemis/api/core/jgroups/JChannelManager.java | 9 +-
.../artemis/api/core/jgroups/JChannelWrapper.java | 5 +-
.../artemis/api/core/jgroups/JGroupsReceiver.java | 3 +-
.../api/core/management/AcceptorControl.java | 11 +-
.../core/management/ActiveMQComponentControl.java | 2 +-
.../api/core/management/ActiveMQServerControl.java | 525 +++++++--------
.../api/core/management/AddressControl.java | 113 ++--
.../artemis/api/core/management/Attribute.java | 3 +-
.../core/management/BaseBroadcastGroupControl.java | 8 +-
.../artemis/api/core/management/BridgeControl.java | 51 +-
.../api/core/management/BroadcastGroupControl.java | 6 +-
.../core/management/BrokerConnectionControl.java | 14 +-
.../core/management/ClusterConnectionControl.java | 72 +-
.../api/core/management/DayCounterInfo.java | 15 +-
.../artemis/api/core/management/DivertControl.java | 31 +-
.../JGroupsChannelBroadcastGroupControl.java | 2 +-
.../JGroupsFileBroadcastGroupControl.java | 6 +-
.../api/core/management/ManagementHelper.java | 37 +-
.../api/core/management/MessageCounterInfo.java | 28 +-
.../artemis/api/core/management/NodeInfo.java | 8 +-
.../api/core/management/ObjectNameBuilder.java | 54 +-
.../artemis/api/core/management/Operation.java | 3 +-
.../artemis/api/core/management/Parameter.java | 3 +-
.../artemis/api/core/management/QueueControl.java | 203 +++---
.../management/RemoteBrokerConnectionControl.java | 10 +-
.../artemis/api/core/management/ResourceNames.java | 6 +-
.../artemis/api/core/management/RoleInfo.java | 30 +-
.../api/core/management/SimpleManagement.java | 20 +-
.../impl/ResetLimitWrappedActiveMQBuffer.java | 2 -
.../artemis/core/client/ActiveMQClientLogger.java | 5 +-
.../client/impl/AfterConnectInternalListener.java | 5 +-
.../core/client/impl/ClientConsumerImpl.java | 32 +-
.../core/client/impl/ClientConsumerInternal.java | 3 -
.../core/client/impl/ClientLargeMessageImpl.java | 10 +-
.../core/client/impl/ClientMessageImpl.java | 19 +-
.../core/client/impl/ClientMessageInternal.java | 9 -
.../client/impl/ClientProducerCreditManager.java | 6 +-
.../impl/ClientProducerCreditManagerImpl.java | 3 -
.../core/client/impl/ClientProducerImpl.java | 32 +-
.../core/client/impl/ClientProducerInternal.java | 3 -
.../core/client/impl/ClientSessionFactoryImpl.java | 22 +-
.../client/impl/ClientSessionFactoryInternal.java | 4 +-
.../core/client/impl/ClientSessionImpl.java | 152 +----
.../core/client/impl/ClientSessionInternal.java | 14 +-
.../impl/CompressedLargeMessageControllerImpl.java | 3 -
.../core/client/impl/LargeMessageController.java | 2 +-
.../client/impl/LargeMessageControllerImpl.java | 32 +-
.../core/client/impl/ServerLocatorImpl.java | 42 +-
.../core/client/impl/ServerLocatorInternal.java | 8 +-
.../artemis/core/client/impl/Topology.java | 38 +-
.../core/client/impl/TopologyMemberImpl.java | 10 +-
.../artemis/core/cluster/DiscoveryGroup.java | 15 +-
.../core/config/TransformerConfiguration.java | 6 +-
.../artemis/core/message/LargeBodyReader.java | 8 +-
.../artemis/core/message/impl/CoreMessage.java | 40 +-
.../core/message/impl/CoreMessagePersister.java | 8 +-
.../core/message/impl/MessageInternalImpl.java | 82 +--
.../artemis/core/protocol/core/Channel.java | 95 ++-
.../artemis/core/protocol/core/ChannelHandler.java | 4 +-
.../core/protocol/core/CoreRemotingConnection.java | 34 +-
.../artemis/core/protocol/core/Packet.java | 36 +-
.../core/impl/ActiveMQClientProtocolManager.java | 12 +-
.../protocol/core/impl/ActiveMQSessionContext.java | 5 -
.../core/impl/BackwardsCompatibilityUtils.java | 8 +-
.../core/protocol/core/impl/ChannelImpl.java | 15 +-
.../core/protocol/core/impl/PacketImpl.java | 4 +-
.../protocol/core/impl/RemotingConnectionImpl.java | 15 +-
.../wireformat/ClusterTopologyChangeMessage.java | 3 -
.../ClusterTopologyChangeMessage_V2.java | 6 -
.../core/impl/wireformat/CreateQueueMessage.java | 3 -
.../core/protocol/core/impl/wireformat/Ping.java | 4 +-
.../core/impl/wireformat/QueueAbstractPacket.java | 5 +-
.../core/impl/wireformat/RollbackMessage.java | 6 -
.../impl/wireformat/SessionAddMetaDataMessage.java | 2 +-
.../wireformat/SessionAddMetaDataMessageV2.java | 2 +-
.../SessionBindingQueryResponseMessage.java | 3 -
.../wireformat/SessionContinuationMessage.java | 16 +-
.../wireformat/SessionForceConsumerDelivery.java | 3 -
.../SessionReceiveContinuationMessage.java | 9 -
.../wireformat/SessionReceiveLargeMessage.java | 5 +-
.../wireformat/SessionSendContinuationMessage.java | 27 +-
.../SessionSendContinuationMessage_V2.java | 8 -
.../SessionSendContinuationMessage_V3.java | 8 -
.../core/impl/wireformat/SessionSendMessage.java | 16 +-
.../impl/wireformat/SessionSendMessage_V2.java | 4 +-
.../impl/wireformat/SessionSendMessage_V3.java | 4 +-
.../SubscribeClusterTopologyUpdatesMessageV2.java | 3 -
.../artemis/core/remoting/CloseListener.java | 3 +-
.../artemis/core/remoting/FailureListener.java | 4 +-
.../remoting/impl/TransportConfigurationUtil.java | 12 +-
.../remoting/impl/netty/CheckDependencies.java | 4 +-
.../core/remoting/impl/netty/NettyConnection.java | 8 +-
.../core/remoting/impl/netty/NettyConnector.java | 5 +-
.../remoting/impl/netty/TransportConstants.java | 30 +-
.../impl/ssl/CachingOpenSSLContextFactory.java | 10 +-
.../impl/ssl/CachingSSLContextFactory.java | 14 +-
.../impl/ssl/DefaultOpenSSLContextFactory.java | 6 +-
.../artemis/core/remoting/impl/ssl/SSLSupport.java | 24 +-
.../activemq/artemis/core/security/Role.java | 8 -
.../server/ComponentConfigurationRoutingType.java | 4 +-
.../server/management/NotificationService.java | 8 +-
.../artemis/core/transaction/impl/XidImpl.java | 6 -
.../activemq/artemis/reader/BytesMessageUtil.java | 6 +-
.../activemq/artemis/reader/MessageUtil.java | 2 +-
.../activemq/artemis/reader/StreamMessageUtil.java | 11 +-
.../core/protocol/AbstractRemotingConnection.java | 4 +-
.../spi/core/protocol/RemotingConnection.java | 71 +-
.../spi/core/remoting/AbstractConnector.java | 3 -
.../remoting/BaseConnectionLifeCycleListener.java | 12 +-
.../artemis/spi/core/remoting/BufferDecoder.java | 9 +-
.../artemis/spi/core/remoting/BufferHandler.java | 3 +-
.../spi/core/remoting/ClientProtocolManager.java | 4 +-
.../remoting/ClientProtocolManagerFactory.java | 4 +-
.../artemis/spi/core/remoting/Connection.java | 55 +-
.../artemis/spi/core/remoting/Connector.java | 23 +-
.../spi/core/remoting/ConnectorFactory.java | 2 +-
.../artemis/spi/core/remoting/SessionContext.java | 37 +-
.../core/remoting/ssl/OpenSSLContextFactory.java | 21 +-
.../ssl/OpenSSLContextFactoryProvider.java | 5 +-
.../spi/core/remoting/ssl/SSLContextConfig.java | 6 +-
.../spi/core/remoting/ssl/SSLContextFactory.java | 22 +-
.../remoting/ssl/SSLContextFactoryProvider.java | 6 +-
.../InVMTransportConfigurationSchema.java | 3 +-
.../schema/serverLocator/ConnectionOptions.java | 5 +-
.../artemis/utils/ActiveMQBufferInputStream.java | 8 -
.../activemq/artemis/utils/AutoCreateUtil.java | 15 +-
.../activemq/artemis/utils/BufferHelper.java | 12 -
.../artemis/utils/ConfirmationWindowWarning.java | 3 -
.../activemq/artemis/utils/DeflaterReader.java | 9 +-
.../apache/activemq/artemis/utils/IDGenerator.java | 10 +-
.../activemq/artemis/utils/InflaterReader.java | 9 +-
.../activemq/artemis/utils/InflaterWriter.java | 9 +-
.../apache/activemq/artemis/utils/JNDIUtil.java | 7 +-
.../utils/ObjectInputStreamWithClassLoader.java | 38 +-
.../apache/activemq/artemis/utils/PrefixUtil.java | 6 +-
.../artemis/utils/TimeAndCounterIDGenerator.java | 4 +-
.../activemq/artemis/utils/TokenBucketLimiter.java | 2 +-
.../artemis/utils/TokenBucketLimiterImpl.java | 6 +-
.../org/apache/activemq/artemis/utils/XMLUtil.java | 3 +-
.../remoting/impl/netty/TransportConstantTest.java | 5 +-
.../activemq/artemis/message/CoreMessageTest.java | 26 +-
.../apache/activemq/artemis/dto/RequestLogDTO.java | 3 +-
.../artemis/jdbc/store/drivers/JDBCUtils.java | 6 +-
.../jdbc/store/file/JDBCSequentialFile.java | 17 +-
.../file/JDBCSequentialFileFactoryDriver.java | 34 -
.../store/file/PostgresLargeObjectManager.java | 3 +-
.../artemis/jdbc/store/file/ScheduledWrite.java | 4 +-
.../jdbc/store/journal/JDBCJournalImpl.java | 12 +-
.../store/journal/JDBCJournalLoaderCallback.java | 6 +-
.../jdbc/store/sql/PropertySQLProvider.java | 4 +-
.../store/file/JDBCSequentialFileFactoryTest.java | 2 -
.../artemis/api/jms/ActiveMQJMSClient.java | 69 +-
.../activemq/artemis/api/jms/JMSFactoryType.java | 67 +-
.../api/jms/management/JMSManagementHelper.java | 33 +-
.../artemis/jms/client/ActiveMQConnection.java | 45 +-
.../jms/client/ActiveMQConnectionFactory.java | 34 +-
.../artemis/jms/client/ActiveMQDestination.java | 10 +-
.../artemis/jms/client/ActiveMQJMSContext.java | 9 +-
.../artemis/jms/client/ActiveMQJMSProducer.java | 13 +-
.../artemis/jms/client/ActiveMQMapMessage.java | 15 +-
.../artemis/jms/client/ActiveMQMessage.java | 33 +-
.../jms/client/ActiveMQMessageConsumer.java | 4 +-
.../jms/client/ActiveMQMessageProducer.java | 10 +-
.../artemis/jms/client/ActiveMQObjectMessage.java | 2 +-
.../activemq/artemis/jms/client/ActiveMQQueue.java | 7 +-
.../artemis/jms/client/ActiveMQSession.java | 172 ++++-
.../artemis/jms/client/ActiveMQTemporaryQueue.java | 6 +-
.../artemis/jms/client/ActiveMQTextMessage.java | 2 -
.../activemq/artemis/jms/client/ActiveMQTopic.java | 7 +-
.../artemis/jms/client/ActiveMQXAConnection.java | 4 +-
.../jms/client/ActiveMQXAConnectionFactory.java | 3 +-
.../artemis/jms/client/ActiveMQXASession.java | 8 -
.../jms/client/ConnectionFactoryOptions.java | 4 +-
.../jms/client/DefaultConnectionProperties.java | 3 +-
.../artemis/jms/client/JmsExceptionUtils.java | 6 -
.../artemis/jms/client/ThreadAwareContext.java | 34 +-
.../jndi/ActiveMQInitialContextFactory.java | 8 +-
.../artemis/jndi/JNDIReferenceFactory.java | 45 +-
.../apache/activemq/artemis/jndi/JNDIStorable.java | 27 +-
.../activemq/artemis/jndi/ReadOnlyContext.java | 38 +-
.../activemq/artemis/uri/JMSConnectionOptions.java | 5 +-
.../artemis/jms/bridge/QualityOfServiceMode.java | 64 +-
.../artemis/jms/bridge/impl/JMSBridgeImpl.java | 25 +-
.../jms/persistence/config/PersistedBindings.java | 20 -
.../config/PersistedConnectionFactory.java | 12 -
.../artemis/jms/server/JMSServerConfigParser.java | 4 -
.../artemis/jms/server/JMSServerManager.java | 76 +--
.../impl/ConnectionFactoryConfigurationImpl.java | 12 +-
.../server/config/impl/FileJMSConfiguration.java | 19 -
.../artemis/jms/server/embedded/EmbeddedJMS.java | 18 +-
.../jms/server/impl/JMSServerManagerImpl.java | 165 +----
.../artemis/core/io/AbstractSequentialFile.java | 11 +-
.../core/io/AbstractSequentialFileFactory.java | 6 +-
.../activemq/artemis/core/io/IOCallback.java | 10 +-
.../activemq/artemis/core/io/SequentialFile.java | 57 +-
.../artemis/core/io/SequentialFileFactory.java | 32 +-
.../artemis/core/io/aio/AIOSequentialFile.java | 9 +-
.../core/io/aio/AIOSequentialFileFactory.java | 9 +-
.../artemis/core/io/buffer/TimedBuffer.java | 10 +-
.../core/io/buffer/TimedBufferObserver.java | 3 +-
.../artemis/core/io/mapped/MappedFile.java | 12 +-
.../artemis/core/io/nio/NIOSequentialFile.java | 14 +-
.../core/io/nio/NIOSequentialFileFactory.java | 2 +-
.../artemis/core/io/util/ByteBufferPool.java | 15 +-
.../artemis/core/journal/EncoderPersister.java | 6 +-
.../activemq/artemis/core/journal/Journal.java | 94 ++-
.../core/journal/JournalLoadInformation.java | 16 -
.../activemq/artemis/core/journal/RecordInfo.java | 3 +-
.../core/journal/TransactionFailureCallback.java | 7 +-
.../core/journal/collections/JournalHashMap.java | 23 +-
.../journal/impl/AbstractJournalUpdateTask.java | 9 -
.../core/journal/impl/FileWrapperJournal.java | 12 +-
.../core/journal/impl/JournalCompactor.java | 23 +-
.../core/journal/impl/JournalConstants.java | 7 +-
.../artemis/core/journal/impl/JournalFile.java | 7 +-
.../core/journal/impl/JournalFilesRepository.java | 38 +-
.../artemis/core/journal/impl/JournalImpl.java | 165 ++---
.../core/journal/impl/JournalReaderCallback.java | 33 -
.../artemis/core/journal/impl/JournalRecord.java | 6 +-
.../core/journal/impl/JournalRecordProvider.java | 7 +-
.../core/journal/impl/JournalTransaction.java | 44 +-
.../core/journal/impl/ObjIntIntArrayList.java | 7 +-
.../artemis/core/journal/impl/Reclaimer.java | 22 +-
.../journal/impl/dataformat/JournalAddRecord.java | 10 -
.../impl/dataformat/JournalAddRecordTX.java | 5 -
.../impl/dataformat/JournalCompleteRecordTX.java | 13 +-
.../impl/dataformat/JournalDeleteRecord.java | 3 -
.../impl/dataformat/JournalDeleteRecordTX.java | 5 -
.../artemis/core/io/aio/FileIOUtilTest.java | 8 +-
.../artemis/junit/ActiveMQConsumerResource.java | 17 +-
.../junit/ActiveMQDynamicProducerResource.java | 17 +-
.../artemis/junit/ActiveMQProducerResource.java | 10 +-
.../artemis/junit/EmbeddedActiveMQResource.java | 21 +-
.../artemis/junit/EmbeddedJMSResource.java | 22 +-
.../artemis/junit/ActiveMQConsumerExtension.java | 12 +-
.../junit/ActiveMQDynamicProducerExtension.java | 13 +-
.../artemis/junit/ActiveMQProducerExtension.java | 13 +-
.../artemis/junit/EmbeddedActiveMQExtension.java | 4 +-
.../junit/AbstractActiveMQClientDelegate.java | 2 -
.../artemis/junit/ActiveMQConsumerOperations.java | 9 +-
.../junit/ActiveMQDynamicProducerOperations.java | 22 +-
.../artemis/junit/ActiveMQProducerOperations.java | 37 +-
.../artemis/junit/EmbeddedActiveMQDelegate.java | 5 +-
.../artemis/junit/EmbeddedActiveMQOperations.java | 134 ++--
.../artemis/junit/EmbeddedJMSDelegate.java | 22 +-
.../artemis/junit/EmbeddedJMSOperations.java | 50 +-
.../lockmanager/file/FileBasedLockManager.java | 5 +-
.../artemis/logs/annotation/GetLogger.java | 4 +-
.../artemis/logs/annotation/LogBundle.java | 9 +-
.../artemis/logs/annotation/LogMessage.java | 10 +-
.../processor/LogAnnotationProcessor.java | 4 +-
.../artemis/maven/ArtemisCreatePlugin.java | 4 +-
.../artemis/maven/ArtemisDependencyDocPlugin.java | 26 +-
.../artemis/maven/ArtemisDependencyScanPlugin.java | 4 +-
.../protocol/amqp/broker/AMQPLargeMessage.java | 21 +-
.../artemis/protocol/amqp/broker/AMQPMessage.java | 124 ++--
.../amqp/broker/AMQPMessageBrokerAccessor.java | 30 +-
.../protocol/amqp/broker/AMQPMessagePersister.java | 4 +-
.../amqp/broker/AMQPMessagePersisterV2.java | 4 +-
.../amqp/broker/AMQPMessagePersisterV3.java | 4 +-
.../protocol/amqp/broker/AMQPSessionCallback.java | 66 +-
.../protocol/amqp/broker/AMQPStandardMessage.java | 4 +-
.../broker/ActiveMQProtonRemotingConnection.java | 6 +-
.../artemis/protocol/amqp/broker/KMPNeedle.java | 11 +-
.../amqp/broker/ProtonProtocolManager.java | 34 +-
.../amqp/broker/ProtonProtocolManagerFactory.java | 11 +-
.../amqp/client/ProtonClientProtocolManager.java | 7 +-
.../amqp/connect/AMQPBrokerConnection.java | 63 +-
.../connect/AMQPBrokerConnectionConstants.java | 12 +-
.../amqp/connect/AMQPBrokerConnectionManager.java | 18 +-
.../amqp/connect/AMQPRemoteBrokerConnection.java | 59 +-
.../amqp/connect/federation/AMQPFederation.java | 210 +++---
.../federation/AMQPFederationAddressConsumer.java | 15 +-
.../AMQPFederationAddressPolicyManager.java | 64 +-
.../AMQPFederationAddressSenderController.java | 9 +-
.../federation/AMQPFederationAsyncCompletion.java | 15 +-
.../AMQPFederationCommandDispatcher.java | 35 +-
.../federation/AMQPFederationCommandProcessor.java | 13 +-
.../federation/AMQPFederationConfiguration.java | 108 +--
.../federation/AMQPFederationConstants.java | 192 +++---
.../connect/federation/AMQPFederationConsumer.java | 126 ++--
.../AMQPFederationConsumerConfiguration.java | 45 +-
.../federation/AMQPFederationConsumerControl.java | 52 +-
.../federation/AMQPFederationConsumerManager.java | 114 ++--
.../connect/federation/AMQPFederationControl.java | 6 +-
.../federation/AMQPFederationEventDispatcher.java | 56 +-
.../federation/AMQPFederationEventProcessor.java | 27 +-
.../federation/AMQPFederationEventSupport.java | 51 +-
.../AMQPFederationGenericConsumerInfo.java | 27 +-
.../AMQPFederationLocalPolicyControl.java | 6 +-
.../AMQPFederationLocalPolicyManager.java | 107 ++-
.../AMQPFederationManagementSupport.java | 188 ++----
.../connect/federation/AMQPFederationMetrics.java | 12 +-
.../federation/AMQPFederationPolicyManager.java | 67 +-
.../federation/AMQPFederationPolicySupport.java | 116 ++--
.../federation/AMQPFederationProducerControl.java | 56 +-
.../federation/AMQPFederationQueueConsumer.java | 21 +-
.../AMQPFederationQueuePolicyManager.java | 69 +-
.../AMQPFederationQueueSenderController.java | 8 +-
.../AMQPFederationRemoteAddressPolicyManager.java | 13 +-
.../AMQPFederationRemotePolicyControl.java | 11 +-
.../AMQPFederationRemotePolicyControlType.java | 8 +-
.../AMQPFederationRemotePolicyManager.java | 35 +-
.../AMQPFederationRemoteQueuePolicyManager.java | 13 +-
.../federation/AMQPFederationSenderController.java | 20 +-
.../connect/federation/AMQPFederationSource.java | 63 +-
.../AMQPFederationSourceControlType.java | 6 +-
.../connect/federation/AMQPFederationTarget.java | 8 +-
.../AMQPFederationTargetControlType.java | 6 +-
.../ActiveMQServerAMQPFederationPlugin.java | 73 +-
.../mirror/AMQPMirrorControllerAggregation.java | 4 +-
.../connect/mirror/AMQPMirrorControllerSource.java | 16 +-
.../connect/mirror/AMQPMirrorControllerTarget.java | 30 +-
.../connect/mirror/AMQPMirrorMessageFactory.java | 3 +-
.../protocol/amqp/connect/mirror/AckManager.java | 10 +-
.../amqp/connect/mirror/MirrorTransaction.java | 5 +-
.../amqp/connect/mirror/ReferenceIDSupplier.java | 9 +-
.../amqp/connect/mirror/ReferenceNodeStore.java | 4 +-
.../amqp/converter/AMQPContentTypeSupport.java | 8 +-
.../amqp/converter/AMQPMessageIdHelper.java | 88 +--
.../amqp/converter/AMQPMessageSupport.java | 77 +--
.../protocol/amqp/converter/AmqpCoreConverter.java | 5 +-
.../coreWrapper/CoreMapMessageWrapper.java | 4 +-
.../coreWrapper/CoreTextMessageWrapper.java | 6 +-
.../protocol/amqp/federation/Federation.java | 6 +-
.../amqp/federation/FederationConstants.java | 7 +-
.../amqp/federation/FederationConsumer.java | 4 +-
.../amqp/federation/FederationConsumerInfo.java | 53 +-
.../FederationReceiveFromAddressPolicy.java | 15 +-
.../FederationReceiveFromQueuePolicy.java | 4 +-
.../FederationReceiveFromResourcePolicy.java | 12 +-
.../logger/ActiveMQAMQPProtocolMessageBundle.java | 8 +-
.../amqp/proton/AMQPConnectionContext.java | 31 +-
.../protocol/amqp/proton/AMQPConstants.java | 6 +-
.../amqp/proton/AMQPLargeMessageReader.java | 3 +-
.../amqp/proton/AMQPLargeMessageWriter.java | 7 +-
.../protocol/amqp/proton/AMQPMessageWriter.java | 5 +-
.../protocol/amqp/proton/AMQPSessionContext.java | 4 -
.../proton/AMQPTunneledCoreLargeMessageReader.java | 21 +-
.../proton/AMQPTunneledCoreLargeMessageWriter.java | 10 +-
.../amqp/proton/AMQPTunneledCoreMessageReader.java | 7 +-
.../amqp/proton/AMQPTunneledCoreMessageWriter.java | 10 +-
.../amqp/proton/AMQPTunneledMessageConstants.java | 28 +-
.../artemis/protocol/amqp/proton/AmqpSupport.java | 151 ++---
.../amqp/proton/AmqpTransferTagGenerator.java | 24 +-
.../amqp/proton/DefaultSenderController.java | 10 +-
.../protocol/amqp/proton/MessageReader.java | 35 +-
.../protocol/amqp/proton/MessageWriter.java | 59 +-
.../amqp/proton/ProtonAbstractReceiver.java | 115 ++--
.../amqp/proton/ProtonDeliveryHandler.java | 7 +-
.../amqp/proton/ProtonServerSenderContext.java | 15 +-
.../protocol/amqp/proton/SenderController.java | 49 +-
.../protocol/amqp/proton/handler/EventHandler.java | 3 -
.../amqp/proton/handler/ProtonHandler.java | 22 +-
.../proton/transaction/ProtonTransactionImpl.java | 17 +-
.../ProtonTransactionRefsOperation.java | 8 +-
.../amqp/sasl/ExternalServerSASLFactory.java | 3 -
.../protocol/amqp/sasl/GSSAPIServerSASL.java | 4 +-
.../protocol/amqp/sasl/ServerSASLFactory.java | 15 +-
.../protocol/amqp/sasl/ServerSASLPlain.java | 3 -
.../protocol/amqp/sasl/scram/SCRAMClientSASL.java | 3 +-
.../amqp/sasl/scram/SCRAMServerSASLFactory.java | 4 +-
.../amqp/sasl/scram/ScramClientFunctionality.java | 55 +-
.../sasl/scram/ScramClientFunctionalityImpl.java | 16 +-
.../amqp/sasl/scram/ScramServerFunctionality.java | 52 +-
.../sasl/scram/ScramServerFunctionalityImpl.java | 14 +-
.../artemis/protocol/amqp/util/NettyReadable.java | 4 +-
.../artemis/protocol/amqp/util/NettyWritable.java | 4 +-
.../artemis/protocol/amqp/util/TLSEncode.java | 4 +-
.../protocol/amqp/broker/AMQPMessageTest.java | 4 +-
.../AMQPFederationPolicySupportTest.java | 3 +-
.../converter/message/AMQPMessageIdHelperTest.java | 290 ++++----
.../message/JMSMappingInboundTransformerTest.java | 91 ++-
.../artemis/protocol/amqp/sasl/SCRAMTest.java | 3 -
.../HornetQClientProtocolManagerFactory.java | 4 +-
.../artemis/core/protocol/mqtt/MQTTConnection.java | 5 -
.../core/protocol/mqtt/MQTTConnectionManager.java | 8 +-
.../core/protocol/mqtt/MQTTProtocolHandler.java | 7 +-
.../core/protocol/mqtt/MQTTProtocolManager.java | 8 +-
.../core/protocol/mqtt/MQTTPublishManager.java | 3 -
.../core/protocol/mqtt/MQTTSessionState.java | 23 +-
.../core/protocol/mqtt/MQTTStateManager.java | 41 +-
.../protocol/mqtt/MQTTSubscriptionManager.java | 8 +-
.../artemis/core/protocol/mqtt/MQTTUtil.java | 28 +-
.../artemis/core/protocol/mqtt/MQTTUtilTest.java | 29 +-
.../artemis/core/protocol/mqtt/StateSerDeTest.java | 29 +-
.../core/protocol/openwire/OpenWireConnection.java | 17 +-
.../protocol/openwire/OpenWireFrameParser.java | 3 +-
.../protocol/openwire/OpenWireProtocolManager.java | 26 +-
.../openwire/amq/AMQConnectionContext.java | 21 -
.../core/protocol/openwire/amq/AMQConsumer.java | 13 +-
.../openwire/amq/AMQProducerBrokerExchange.java | 12 -
.../core/protocol/openwire/amq/AMQSession.java | 10 +-
.../core/protocol/stomp/StompConnection.java | 7 +-
.../artemis/core/protocol/stomp/StompDecoder.java | 8 -
.../core/protocol/stomp/StompFrameInterceptor.java | 2 +-
.../core/protocol/stomp/StompProtocolManager.java | 3 -
.../protocol/stomp/VersionedStompFrameHandler.java | 7 +-
.../protocol/stomp/v11/StompFrameHandlerV11.java | 5 +-
.../protocol/stomp/v12/StompFrameHandlerV12.java | 3 +-
.../ConnectionFactoryObjectFactory.java | 2 +-
.../referenceable/SerializableObjectRefAddr.java | 2 +-
.../artemis/ra/ActiveMQRABytesMessage.java | 141 +---
.../ra/ActiveMQRAConnectionFactoryImpl.java | 125 ++--
.../artemis/ra/ActiveMQRAConnectionManager.java | 8 -
.../artemis/ra/ActiveMQRAConnectionMetaData.java | 39 +-
.../ra/ActiveMQRAConnectionRequestInfo.java | 89 +--
.../activemq/artemis/ra/ActiveMQRACredential.java | 59 +-
.../artemis/ra/ActiveMQRALocalTransaction.java | 23 -
.../activemq/artemis/ra/ActiveMQRALogger.java | 4 +-
.../artemis/ra/ActiveMQRAMCFProperties.java | 51 +-
.../artemis/ra/ActiveMQRAManagedConnection.java | 153 +----
.../ra/ActiveMQRAManagedConnectionFactory.java | 126 +---
.../activemq/artemis/ra/ActiveMQRAMapMessage.java | 159 +----
.../activemq/artemis/ra/ActiveMQRAMessage.java | 283 ++------
.../artemis/ra/ActiveMQRAMessageConsumer.java | 76 +--
.../artemis/ra/ActiveMQRAMessageListener.java | 20 +-
.../artemis/ra/ActiveMQRAMessageProducer.java | 127 +---
.../activemq/artemis/ra/ActiveMQRAMetaData.java | 33 +-
.../artemis/ra/ActiveMQRAObjectMessage.java | 20 +-
.../activemq/artemis/ra/ActiveMQRAProperties.java | 55 +-
.../artemis/ra/ActiveMQRAQueueReceiver.java | 13 +-
.../activemq/artemis/ra/ActiveMQRAQueueSender.java | 28 +-
.../activemq/artemis/ra/ActiveMQRAService.java | 8 +-
.../activemq/artemis/ra/ActiveMQRASession.java | 316 ++-------
.../artemis/ra/ActiveMQRASessionFactory.java | 18 +-
.../artemis/ra/ActiveMQRASessionFactoryImpl.java | 217 +-----
.../artemis/ra/ActiveMQRAStreamMessage.java | 130 +---
.../activemq/artemis/ra/ActiveMQRATextMessage.java | 18 +-
.../artemis/ra/ActiveMQRATopicPublisher.java | 41 +-
.../artemis/ra/ActiveMQRATopicSubscriber.java | 18 +-
.../activemq/artemis/ra/ActiveMQRAXAResource.java | 22 +-
.../activemq/artemis/ra/ActiveMQRaUtils.java | 34 +-
.../artemis/ra/ActiveMQResourceAdapter.java | 481 +------------
.../artemis/ra/ConnectionFactoryProperties.java | 7 +-
.../artemis/ra/inflow/ActiveMQActivation.java | 66 +-
.../artemis/ra/inflow/ActiveMQActivationSpec.java | 248 +------
.../artemis/ra/inflow/ActiveMQMessageHandler.java | 9 -
.../ActiveMQRAConnectionFactoryObjectFactory.java | 2 +-
.../referenceable/SerializableObjectRefAddr.java | 4 +-
artemis-selector/pom.xml | 18 +
.../selector/filter/ArithmeticExpression.java | 11 -
.../artemis/selector/filter/BinaryExpression.java | 22 +-
.../artemis/selector/filter/BooleanExpression.java | 9 +-
.../selector/filter/ComparisonExpression.java | 20 +-
.../selector/filter/ConstantExpression.java | 17 +-
.../artemis/selector/filter/Expression.java | 4 +-
.../artemis/selector/filter/Filterable.java | 18 +-
.../artemis/selector/filter/LogicExpression.java | 6 +-
.../selector/filter/PropertyExpression.java | 11 -
.../artemis/selector/filter/UnaryExpression.java | 16 +-
.../artemis/selector/filter/XPathExpression.java | 4 +-
.../artemis/selector/filter/XQueryExpression.java | 4 +-
.../activemq/artemis/selector/impl/LRUCache.java | 28 +-
.../activemq/artemis/selector/SelectorTest.java | 3 -
.../selector/UnknownHandlingSelectorTest.java | 6 +-
.../activemq/artemis/osgi/ProtocolTracker.java | 7 +-
.../artemis/core/config/BridgeConfiguration.java | 82 +--
.../config/ClusterConnectionConfiguration.java | 61 --
.../artemis/core/config/Configuration.java | 570 ++++++++--------
.../core/config/CoreQueueConfiguration.java | 33 -
.../artemis/core/config/DivertConfiguration.java | 26 +-
.../artemis/core/config/FileDeploymentManager.java | 18 +-
.../artemis/core/config/WildcardConfiguration.java | 14 +-
.../AMQPFederatedBrokerConnectionElement.java | 52 +-
.../AMQPFederationBrokerPlugin.java | 5 +-
.../AMQPMirrorBrokerConnectionElement.java | 26 +-
.../BrokerConnectConfiguration.java | 7 +-
.../core/config/ha/ReplicaPolicyConfiguration.java | 4 +-
.../ha/ReplicationBackupPolicyConfiguration.java | 4 +-
.../core/config/impl/ConfigurationImpl.java | 6 -
.../core/config/impl/FileConfiguration.java | 5 +-
.../core/config/impl/LegacyJMSConfiguration.java | 6 -
.../core/config/impl/SecurityConfiguration.java | 12 +-
.../storage/DatabaseStorageConfiguration.java | 16 +-
.../artemis/core/deployers/Deployable.java | 35 +-
.../deployers/impl/FileConfigurationParser.java | 65 +-
.../activemq/artemis/core/filter/Filter.java | 9 +-
.../activemq/artemis/core/filter/FilterUtils.java | 4 +-
.../artemis/core/filter/impl/FilterImpl.java | 30 +-
.../management/impl/ActiveMQServerControlImpl.java | 5 -
.../core/management/impl/QueueControlImpl.java | 26 +-
.../management/impl/view/ActiveMQAbstractView.java | 3 -
.../core/management/impl/view/ConsumerField.java | 5 +-
.../core/management/impl/view/ProducerField.java | 5 +-
.../core/messagecounter/MessageCounter.java | 49 +-
.../impl/MessageCounterManagerImpl.java | 3 -
.../artemis/core/paging/PageTransactionInfo.java | 14 +-
.../activemq/artemis/core/paging/PagedMessage.java | 20 +-
.../artemis/core/paging/PagingManager.java | 23 +-
.../activemq/artemis/core/paging/PagingStore.java | 64 +-
.../core/paging/cursor/NonExistentPage.java | 6 +-
.../core/paging/cursor/PageCursorProvider.java | 4 -
.../core/paging/cursor/PageSubscription.java | 28 +-
.../core/paging/cursor/PagedReferenceImpl.java | 11 +-
.../cursor/impl/PageCounterRebuildManager.java | 13 +-
.../paging/cursor/impl/PageCursorProviderImpl.java | 53 +-
.../core/paging/cursor/impl/PagePositionImpl.java | 30 +-
.../cursor/impl/PageSubscriptionCounterImpl.java | 28 +-
.../paging/cursor/impl/PageSubscriptionImpl.java | 49 +-
.../activemq/artemis/core/paging/impl/Page.java | 18 +-
.../artemis/core/paging/impl/PageCache.java | 3 +-
.../artemis/core/paging/impl/PageTimedWriter.java | 9 +-
.../core/paging/impl/PageTransactionInfoImpl.java | 21 +-
.../artemis/core/paging/impl/PagedMessageImpl.java | 4 +-
.../core/paging/impl/PagingManagerImpl.java | 11 +-
.../artemis/core/paging/impl/PagingStoreImpl.java | 53 +-
.../artemis/core/persistence/OperationContext.java | 15 +-
.../artemis/core/persistence/StorageManager.java | 92 +--
.../config/PersistedAddressSetting.java | 10 +-
.../config/PersistedAddressSettingJSON.java | 4 -
.../core/persistence/config/PersistedRole.java | 3 -
.../config/PersistedSecuritySetting.java | 59 --
.../core/persistence/config/PersistedUser.java | 3 -
.../journal/AbstractJournalStorageManager.java | 55 +-
.../impl/journal/BatchingIDGenerator.java | 4 +-
.../persistence/impl/journal/BufferSplitter.java | 4 +-
.../persistence/impl/journal/DescribeJournal.java | 5 -
.../persistence/impl/journal/JournalRecordIds.java | 5 +-
.../impl/journal/JournalStorageManager.java | 25 +-
.../core/persistence/impl/journal/LargeBody.java | 13 +-
.../impl/journal/LargeServerMessageImpl.java | 8 +-
.../impl/journal/LargeServerMessageInSync.java | 6 -
.../impl/journal/OperationContextImpl.java | 26 +-
.../impl/journal/codec/DeleteEncoding.java | 9 -
.../journal/codec/FinishPageMessageOperation.java | 3 +-
.../impl/journal/codec/LargeMessagePersister.java | 10 -
.../journal/codec/PendingLargeMessageEncoding.java | 10 -
.../activemq/artemis/core/postoffice/Address.java | 2 +-
.../artemis/core/postoffice/AddressManager.java | 16 +-
.../activemq/artemis/core/postoffice/Binding.java | 6 +-
.../activemq/artemis/core/postoffice/Bindings.java | 4 -
.../artemis/core/postoffice/DuplicateIDCache.java | 5 +-
.../artemis/core/postoffice/PostOffice.java | 33 +-
.../artemis/core/postoffice/QueueInfo.java | 3 -
.../artemis/core/postoffice/impl/AddressImpl.java | 2 +-
.../artemis/core/postoffice/impl/AddressMap.java | 6 +-
.../artemis/core/postoffice/impl/BindingsImpl.java | 16 +-
.../core/postoffice/impl/CopyOnWriteBindings.java | 26 +-
.../postoffice/impl/InMemoryDuplicateIDCache.java | 11 +-
.../impl/PersistentDuplicateIDCache.java | 11 +-
.../core/postoffice/impl/PostOfficeImpl.java | 24 +-
.../core/postoffice/impl/SimpleAddressManager.java | 3 -
.../postoffice/impl/WildcardAddressManager.java | 6 +-
.../artemis/core/protocol/ProtocolHandler.java | 3 +-
.../protocol/core/ServerSessionPacketHandler.java | 3 +-
.../protocol/core/impl/ActiveMQPacketHandler.java | 3 +-
.../core/impl/CoreProtocolManagerFactory.java | 7 +-
.../impl/wireformat/BackupRegistrationMessage.java | 8 +-
.../core/impl/wireformat/NodeAnnounceMessage.java | 3 -
.../impl/wireformat/ReplicationAddMessage.java | 12 -
.../impl/wireformat/ReplicationAddTXMessage.java | 9 -
.../impl/wireformat/ReplicationCommitMessage.java | 3 -
.../impl/wireformat/ReplicationDeleteMessage.java | 6 -
.../wireformat/ReplicationDeleteTXMessage.java | 9 -
.../ReplicationLargeMessageBeginMessage.java | 3 -
.../ReplicationLargeMessageEndMessage.java | 9 +-
.../ReplicationLargeMessageWriteMessage.java | 10 -
.../wireformat/ReplicationPageEventMessage.java | 9 -
.../wireformat/ReplicationPageWriteMessage.java | 6 -
.../impl/wireformat/ReplicationPrepareMessage.java | 6 -
.../ReplicationPrimaryIsStoppingMessage.java | 16 +-
.../wireformat/ReplicationStartSyncMessage.java | 8 +-
.../wireformat/ReplicationSyncFileMessage.java | 11 +-
.../core/remoting/impl/invm/InVMAcceptor.java | 2 +-
.../remoting/impl/netty/HttpAcceptorHandler.java | 3 +-
.../core/remoting/impl/netty/NettyAcceptor.java | 16 +-
.../core/remoting/server/RemotingService.java | 34 +-
.../remoting/server/impl/RemotingServiceImpl.java | 10 +-
.../core/replication/ReplicatedJournal.java | 157 +----
.../core/replication/ReplicatedLargeMessage.java | 3 +-
.../core/replication/ReplicationEndpoint.java | 73 +-
.../core/replication/ReplicationManager.java | 45 +-
.../core/security/impl/SecurityStoreImpl.java | 21 +-
.../artemis/core/server/ActivateCallback.java | 17 +-
.../core/server/ActivationFailureListener.java | 4 +-
.../artemis/core/server/ActiveMQMessageBundle.java | 20 +-
.../artemis/core/server/ActiveMQServer.java | 206 +++---
.../artemis/core/server/ActiveMQServers.java | 4 +-
.../artemis/core/server/BrokerConnection.java | 12 +-
.../activemq/artemis/core/server/Consumer.java | 39 +-
.../activemq/artemis/core/server/ConsumerInfo.java | 55 +-
.../core/server/CoreLargeServerMessage.java | 3 +-
.../activemq/artemis/core/server/HandleStatus.java | 6 +-
.../artemis/core/server/LargeServerMessage.java | 2 -
.../artemis/core/server/MemoryManager.java | 3 +-
.../artemis/core/server/MessageReference.java | 38 +-
.../activemq/artemis/core/server/NodeLocator.java | 6 +-
.../activemq/artemis/core/server/NodeManager.java | 5 -
.../apache/activemq/artemis/core/server/Queue.java | 105 ++-
.../activemq/artemis/core/server/QueueConfig.java | 21 +-
.../activemq/artemis/core/server/QueueFactory.java | 6 +-
.../core/server/RemoteBrokerConnection.java | 15 +-
.../artemis/core/server/RoutingContext.java | 4 +-
.../artemis/core/server/SecuritySettingPlugin.java | 16 +-
.../artemis/core/server/ServerConsumer.java | 29 +-
.../artemis/core/server/ServerMessage.java | 6 +-
.../artemis/core/server/ServerSession.java | 31 +-
.../artemis/core/server/ServiceRegistry.java | 30 +-
.../artemis/core/server/cluster/BackupManager.java | 93 ++-
.../artemis/core/server/cluster/Bridge.java | 4 +-
.../core/server/cluster/ClusterConnection.java | 13 +-
.../core/server/cluster/ClusterControl.java | 27 +-
.../core/server/cluster/ClusterController.java | 39 +-
.../core/server/cluster/ClusterManager.java | 21 +-
.../core/server/cluster/ha/ColocatedHAManager.java | 44 +-
.../artemis/core/server/cluster/ha/HAManager.java | 6 +-
.../artemis/core/server/cluster/ha/HAPolicy.java | 15 +-
.../core/server/cluster/ha/ReplicaPolicy.java | 11 +-
.../core/server/cluster/ha/ReplicatedPolicy.java | 21 +-
.../cluster/ha/ReplicationPrimaryPolicy.java | 3 +-
.../server/cluster/ha/StandaloneHAManager.java | 6 +-
.../core/server/cluster/impl/BridgeImpl.java | 24 +-
.../core/server/cluster/impl/BridgeMetrics.java | 8 +-
.../server/cluster/impl/BroadcastGroupImpl.java | 12 +-
.../cluster/impl/ClusterConnectionBridge.java | 8 +-
.../server/cluster/impl/ClusterConnectionImpl.java | 75 +--
.../cluster/impl/ClusterConnectionMetrics.java | 12 +-
.../core/server/cluster/impl/Redistributor.java | 3 -
.../cluster/impl/RemoteQueueBindingImpl.java | 6 +-
.../artemis/core/server/cluster/quorum/Quorum.java | 4 +-
.../core/server/cluster/quorum/QuorumManager.java | 38 +-
.../core/server/cluster/quorum/QuorumVote.java | 21 +-
.../server/cluster/quorum/QuorumVoteHandler.java | 9 -
.../cluster/quorum/QuorumVoteServerConnect.java | 11 +-
.../cluster/quorum/SharedNothingBackupQuorum.java | 18 +-
.../artemis/core/server/cluster/quorum/Vote.java | 14 +-
.../core/server/embedded/EmbeddedActiveMQ.java | 14 +-
.../artemis/core/server/federation/Federation.java | 8 +-
.../core/server/federation/FederationManager.java | 8 +-
.../federation/address/FederatedAddress.java | 10 +-
.../server/federation/queue/FederatedQueue.java | 10 +-
.../artemis/core/server/files/FileMoveManager.java | 5 +-
.../core/server/files/FileStoreMonitor.java | 10 +-
.../artemis/core/server/group/GroupingHandler.java | 4 +-
.../core/server/group/impl/GroupBinding.java | 3 -
.../server/group/impl/LocalGroupingHandler.java | 5 +-
.../server/group/impl/RemoteGroupingHandler.java | 4 +-
.../server/impl/AbstractProtocolReference.java | 7 +-
.../artemis/core/server/impl/Activation.java | 54 +-
.../core/server/impl/ActiveMQServerImpl.java | 58 +-
.../artemis/core/server/impl/AddressInfo.java | 10 -
.../server/impl/AnyNodeLocatorForReplication.java | 7 +-
.../server/impl/BackupRecoveryJournalLoader.java | 9 +-
.../core/server/impl/BucketMessageGroups.java | 19 +-
.../core/server/impl/CleaningActivateCallback.java | 4 +-
.../core/server/impl/ConnectorsService.java | 8 +-
.../core/server/impl/DisabledMessageGroups.java | 3 +-
.../artemis/core/server/impl/DivertImpl.java | 3 -
.../core/server/impl/FileBasedNodeManager.java | 11 +-
.../core/server/impl/FileLockNodeManager.java | 4 -
.../server/impl/GroupFirstMessageReference.java | 7 +-
.../artemis/core/server/impl/InVMNodeManager.java | 6 +-
.../artemis/core/server/impl/LastValueQueue.java | 8 +-
.../artemis/core/server/impl/MapMessageGroups.java | 3 +-
.../core/server/impl/MessageReferenceImpl.java | 11 +-
.../core/server/impl/PostOfficeJournalLoader.java | 9 -
.../core/server/impl/QueueConfigurationUtils.java | 20 +-
.../core/server/impl/QueueConsumersImpl.java | 22 +-
.../artemis/core/server/impl/QueueFactoryImpl.java | 3 -
.../artemis/core/server/impl/QueueImpl.java | 132 ++--
.../core/server/impl/QueueMessageMetrics.java | 14 +-
.../artemis/core/server/impl/RefsOperation.java | 3 +-
.../server/impl/ReplicationBackupActivation.java | 10 +-
.../artemis/core/server/impl/ReplicationError.java | 7 +-
.../core/server/impl/ReplicationObserver.java | 3 +-
.../server/impl/ReplicationPrimaryActivation.java | 8 +-
.../core/server/impl/RoutingContextImpl.java | 2 +-
.../artemis/core/server/impl/ScaleDownHandler.java | 13 +-
.../core/server/impl/ServerConsumerImpl.java | 40 +-
.../core/server/impl/ServerSessionImpl.java | 43 +-
.../core/server/impl/ServiceRegistryImpl.java | 3 +-
.../server/impl/SharedNothingBackupActivation.java | 30 +-
.../impl/SharedNothingPrimaryActivation.java | 15 +-
.../core/server/impl/SimpleMessageGroups.java | 5 +-
.../impl/jdbc/ActiveMQScheduledLeaseLock.java | 3 +-
.../core/server/impl/jdbc/JdbcLeaseLock.java | 8 +-
.../artemis/core/server/impl/jdbc/LeaseLock.java | 19 +-
.../core/server/impl/jdbc/ScheduledLeaseLock.java | 3 +-
.../core/server/impl/jdbc/SharedStateManager.java | 3 +-
.../quorum/ActivationSequenceStateMachine.java | 38 +-
.../server/management/ArtemisMBeanServerGuard.java | 14 +-
.../management/ArtemisRbacInvocationHandler.java | 33 +-
.../server/management/ConnectorServerFactory.java | 2 -
.../core/server/management/JaasAuthenticator.java | 4 +-
.../core/server/management/RmiRegistryFactory.java | 9 -
.../management/impl/HawtioSecurityControlImpl.java | 11 +-
.../management/impl/ManagementServiceImpl.java | 14 +-
.../metrics/NettyPooledAllocatorMetrics.java | 4 +-
.../core/server/mirror/MirrorController.java | 2 +-
.../server/plugin/ActiveMQServerAddressPlugin.java | 9 -
.../server/plugin/ActiveMQServerBasePlugin.java | 5 -
.../server/plugin/ActiveMQServerBindingPlugin.java | 17 -
.../server/plugin/ActiveMQServerBridgePlugin.java | 21 +-
.../plugin/ActiveMQServerConnectionPlugin.java | 9 -
.../plugin/ActiveMQServerConsumerPlugin.java | 26 -
.../plugin/ActiveMQServerCriticalPlugin.java | 5 -
.../plugin/ActiveMQServerFederationPlugin.java | 34 +-
.../server/plugin/ActiveMQServerMessagePlugin.java | 107 +--
.../core/server/plugin/ActiveMQServerPlugin.java | 3 -
.../server/plugin/ActiveMQServerQueuePlugin.java | 33 -
.../plugin/ActiveMQServerResourcePlugin.java | 21 -
.../server/plugin/ActiveMQServerSessionPlugin.java | 42 --
.../plugin/impl/LoggingActiveMQServerPlugin.java | 131 +---
.../impl/NotificationActiveMQServerPlugin.java | 29 -
.../protocol/websocket/WebSocketFrameEncoder.java | 7 +-
.../websocket/WebSocketFrameEncoderType.java | 29 +-
.../core/server/transformer/ServerMessageImpl.java | 6 +-
.../core/settings/HierarchicalRepository.java | 16 +-
.../core/settings/impl/AddressSettings.java | 36 -
.../impl/HierarchicalObjectRepository.java | 50 +-
.../activemq/artemis/core/settings/impl/Match.java | 8 +-
.../core/settings/impl/ResourceLimitSettings.java | 6 -
.../artemis/core/transaction/Transaction.java | 24 +-
.../transaction/TransactionOperationAbstract.java | 3 -
.../transaction/impl/BindingsTransactionImpl.java | 3 -
.../core/transaction/impl/TransactionImpl.java | 3 -
.../protocol/AbstractProtocolManagerFactory.java | 9 +-
.../spi/core/protocol/MessagePersister.java | 8 +-
.../artemis/spi/core/protocol/ProtocolManager.java | 15 +-
.../spi/core/protocol/ProtocolManagerFactory.java | 32 +-
.../artemis/spi/core/protocol/SessionCallback.java | 21 +-
.../artemis/spi/core/remoting/Acceptor.java | 16 +-
.../artemis/spi/core/remoting/AcceptorFactory.java | 4 +-
.../core/security/ActiveMQJAASSecurityManager.java | 6 +-
.../spi/core/security/ActiveMQSecurityManager.java | 11 +-
.../core/security/ActiveMQSecurityManager2.java | 23 +-
.../core/security/ActiveMQSecurityManager3.java | 30 +-
.../core/security/ActiveMQSecurityManager4.java | 34 +-
.../core/security/ActiveMQSecurityManager5.java | 29 +-
.../core/security/ActiveMQSecurityManagerImpl.java | 2 -
.../spi/core/security/jaas/AuditLoginModule.java | 12 +-
.../core/security/jaas/CertificateCallback.java | 12 +-
.../core/security/jaas/CertificateLoginModule.java | 22 +-
.../spi/core/security/jaas/ClientIDCallback.java | 11 -
.../spi/core/security/jaas/DigestCallback.java | 3 +-
.../spi/core/security/jaas/GuestLoginModule.java | 5 +-
.../spi/core/security/jaas/HmacCallback.java | 8 -
.../jaas/PrincipalConversionLoginModule.java | 4 +-
.../spi/core/security/jaas/PrincipalsCallback.java | 4 +-
.../core/security/jaas/ReloadableProperties.java | 2 +-
.../core/security/jaas/SCRAMMechanismCallback.java | 1 +
.../security/jaas/SCRAMPropertiesLoginModule.java | 16 +-
.../jaas/TextFileCertificateLoginModule.java | 30 +-
.../spi/core/security/scram/ScramException.java | 3 +
.../spi/core/security/scram/ScramUtils.java | 97 +--
.../spi/core/security/scram/StringPrep.java | 109 +--
.../artemis/spi/core/security/scram/UserData.java | 19 -
.../core/config/impl/ConfigurationImplTest.java | 1 -
.../config/impl/ConfigurationValidationTest.java | 4 +-
.../config/impl/FileConfigurationParserTest.java | 6 +-
.../impl/WrongRoleFileConfigurationParserTest.java | 7 +-
.../artemis/core/filter/impl/FilterTest.java | 1 -
.../impl/netty/HttpAcceptorHandlerTest.java | 3 -
.../core/security/jaas/NoCacheLoginModule.java | 29 +-
.../cluster/impl/BroadcastGroupImplTest.java | 18 +-
.../artemis/core/server/embedded/MainTest.java | 6 +-
.../server/group/impl/ClusteredResetMockTest.java | 5 +-
.../websocket/WebSocketFrameEncoderTest.java | 3 -
.../websocket/WebSocketServerHandlerTest.java | 3 -
.../artemis/core/settings/RepositoryTest.java | 5 +-
.../artemis/tests/util/ServerTestBase.java | 44 +-
.../artemis/service/extensions/ServiceUtils.java | 7 +-
.../xa/ActiveMQXAResourceWrapperImpl.java | 7 +-
.../xa/recovery/ActiveMQXAResourceRecovery.java | 12 +-
.../xa/recovery/ActiveMQXAResourceWrapper.java | 20 +-
.../extensions/xa/recovery/XARecoveryConfig.java | 3 -
.../artemis/logs/AssertionLoggerHandler.java | 16 +-
.../tests/extensions/SubjectDotDoAsExtension.java | 33 +-
.../extensions/TestMethodNameMatchExtension.java | 8 +-
.../tests/extensions/ThreadLeakCheckDelegate.java | 3 -
.../parameterized/ParameterizedTestExtension.java | 8 +-
.../artemis/tests/util/ArtemisTestCase.java | 10 +-
.../activemq/artemis/utils/SilentTestCase.java | 3 +-
.../artemis/component/AuthenticationFilter.java | 6 +-
.../activemq/artemis/component/JolokiaFilter.java | 18 +-
.../artemis/component/WebServerComponent.java | 2 +-
.../apache/activemq/cli/test/WebServerCLITest.java | 4 +-
docs/hacking-guide/_formatting.adoc | 4 +
etc/checkstyle.xml | 11 +
pom.xml | 2 +-
.../org/apache/activemq/broker/BrokerService.java | 5 +-
.../apache/activemq/broker/SslBrokerService.java | 10 +-
.../broker/artemiswrapper/InVMNameParser.java | 7 -
.../artemiswrapper/NonSerializableFactory.java | 4 -
.../org/apache/activemq/usage/SystemUsage.java | 21 +-
.../apache/activemq/ActiveMQMessageAuditTest.java | 13 +-
.../org/apache/activemq/AutoFailTestSupport.java | 30 +-
.../apache/activemq/CombinationTestSupport.java | 29 +-
.../org/apache/activemq/ConnectionCleanupTest.java | 9 -
...ConnectionCloseMultipleTimesConcurrentTest.java | 9 -
.../activemq/ConnectionCloseMultipleTimesTest.java | 9 -
.../activemq/ConsumerReceiveWithTimeoutTest.java | 13 +-
...eConsumerButDontStartConnectionWarningTest.java | 3 -
.../apache/activemq/EmbeddedBrokerTestSupport.java | 12 +-
.../java/org/apache/activemq/ExpiryHogTest.java | 3 -
.../activemq/JMSDurableTopicRedeliverTest.java | 5 -
.../org/apache/activemq/JMSIndividualAckTest.java | 12 -
.../org/apache/activemq/JMSQueueRedeliverTest.java | 3 -
.../apache/activemq/JmsAutoAckListenerTest.java | 8 -
.../java/org/apache/activemq/JmsAutoAckTest.java | 8 -
.../java/org/apache/activemq/JmsBenchmark.java | 10 +-
.../apache/activemq/JmsClientAckListenerTest.java | 10 -
.../java/org/apache/activemq/JmsClientAckTest.java | 12 -
.../activemq/JmsConnectionStartStopTest.java | 13 -
.../JmsConsumerResetActiveListenerTest.java | 4 -
.../activemq/JmsCreateConsumerInOnMessageTest.java | 13 -
.../JmsDurableQueueWildcardSendReceiveTest.java | 12 +-
.../activemq/JmsDurableTopicSelectorTest.java | 3 -
.../activemq/JmsDurableTopicSendReceiveTest.java | 10 -
.../activemq/JmsDurableTopicTransactionTest.java | 3 -
.../JmsDurableTopicWildcardSendReceiveTest.java | 14 +-
.../activemq/JmsMultipleClientsTestSupport.java | 4 +-
.../org/apache/activemq/JmsQueueBrowserTest.java | 2 -
.../activemq/JmsQueueCompositeSendReceiveTest.java | 22 -
.../apache/activemq/JmsQueueRequestReplyTest.java | 5 -
.../org/apache/activemq/JmsQueueSelectorTest.java | 3 -
.../apache/activemq/JmsQueueSendReceiveTest.java | 5 -
...ReceiveTwoConnectionsStartBeforeBrokerTest.java | 3 -
.../JmsQueueSendReceiveTwoConnectionsTest.java | 5 -
.../JmsQueueSendReceiveUsingTwoSessionsTest.java | 5 -
.../JmsQueueTopicCompositeSendReceiveTest.java | 22 -
.../apache/activemq/JmsQueueTransactionTest.java | 20 +-
.../activemq/JmsQueueWildcardSendReceiveTest.java | 14 -
.../org/apache/activemq/JmsRedeliveredTest.java | 84 +--
.../apache/activemq/JmsSendReceiveTestSupport.java | 31 +-
.../JmsSendReceiveWithMessageExpirationTest.java | 11 -
.../activemq/JmsSendWithAsyncCallbackTest.java | 3 -
.../org/apache/activemq/JmsSessionRecoverTest.java | 38 --
.../apache/activemq/JmsTempDestinationTest.java | 35 +-
.../activemq/JmsTopicCompositeSendReceiveTest.java | 20 -
.../org/apache/activemq/JmsTopicRedeliverTest.java | 21 -
.../apache/activemq/JmsTopicRequestReplyTest.java | 7 +-
.../org/apache/activemq/JmsTopicSelectorTest.java | 3 -
.../JmsTopicSendReceiveSubscriberTest.java | 3 -
.../apache/activemq/JmsTopicSendReceiveTest.java | 7 +-
.../JmsTopicSendReceiveWithTwoConnectionsTest.java | 3 -
...icSendReceiveWithTwoConnectionsWithJMXTest.java | 4 -
.../activemq/JmsTopicSendSameMessageTest.java | 3 -
.../apache/activemq/JmsTopicTransactionTest.java | 3 -
.../activemq/JmsTopicWildcardSendReceiveTest.java | 3 -
.../apache/activemq/JmsTransactionTestSupport.java | 74 +-
.../apache/activemq/LargeMessageTestSupport.java | 3 -
.../activemq/MessageListenerRedeliveryTest.java | 3 -
.../apache/activemq/MessageTransformationTest.java | 5 +-
.../org/apache/activemq/RedeliveryPolicyTest.java | 18 -
.../test/java/org/apache/activemq/TestSupport.java | 7 +-
.../apache/activemq/ZeroPrefetchConsumerTest.java | 3 -
.../activemq/blob/BlobTransferPolicyUriTest.java | 3 -
.../apache/activemq/broker/BrokerBenchmark.java | 14 +-
.../activemq/broker/BrokerRestartTestSupport.java | 11 +-
.../org/apache/activemq/broker/BrokerTest.java | 4 +-
.../apache/activemq/broker/BrokerTestSupport.java | 8 +-
.../activemq/command/ActiveMQBytesMessageTest.java | 14 +-
.../activemq/command/ActiveMQMapMessageTest.java | 14 -
.../activemq/command/ActiveMQMessageTest.java | 15 +-
.../command/ActiveMQObjectMessageTest.java | 14 -
.../command/ActiveMQStreamMessageTest.java | 14 -
.../activemq/command/ActiveMQTextMessageTest.java | 3 -
.../apache/activemq/demo/DefaultQueueSender.java | 12 +-
.../org/apache/activemq/demo/SimpleConsumer.java | 36 +-
.../org/apache/activemq/demo/SimpleProducer.java | 41 +-
.../apache/activemq/demo/SimpleQueueReceiver.java | 32 +-
.../apache/activemq/demo/SimpleQueueSender.java | 37 +-
.../activemq/network/NetworkTestSupport.java | 19 +-
.../activemq/openwire/BooleanStreamTest.java | 3 -
.../activemq/openwire/DataFileGenerator.java | 7 -
.../openwire/NumberRangesWhileMarshallingTest.java | 3 -
.../apache/activemq/test/JmsResourceProvider.java | 86 +--
.../activemq/test/JmsSendReceiveTestSupport.java | 17 +-
.../activemq/test/JmsTopicSendReceiveTest.java | 9 +-
.../JmsTopicSendReceiveWithTwoConnectionsTest.java | 25 -
.../java/org/apache/activemq/test/TestSupport.java | 70 +-
.../activemq/transport/QueueClusterTest.java | 3 -
.../activemq/transport/StubCompositeTransport.java | 3 -
.../apache/activemq/transport/StubTransport.java | 4 -
.../activemq/transport/StubTransportListener.java | 4 -
.../activemq/transport/TopicClusterTest.java | 3 -
.../failover/FailoverComplexClusterTest.java | 56 +-
.../multicast/MulticastTransportTest.java | 4 -
.../transport/nio/NIOJmsSendAndReceiveTest.java | 3 -
.../activemq/transport/peer/PeerTransportTest.java | 6 -
.../transport/reliable/DropCommandStrategy.java | 7 +-
.../transport/reliable/ReliableTransportTest.java | 3 -
.../reliable/UnreliableCommandDatagramChannel.java | 3 -
.../reliable/UnreliableCommandDatagramSocket.java | 3 -
.../transport/reliable/UnreliableUdpTransport.java | 4 +-
.../reliable/UnreliableUdpTransportTest.java | 4 -
.../transport/tcp/InactivityMonitorTest.java | 15 +-
.../transport/tcp/QualityOfServiceUtilsTest.java | 5 +-
.../transport/tcp/ServerSocketTstFactory.java | 2 -
.../transport/tcp/SslContextBrokerServiceTest.java | 3 -
.../activemq/transport/tcp/TcpFaultyTransport.java | 5 -
.../transport/tcp/TcpFaultyTransportServer.java | 5 -
.../transport/tcp/TcpTransportBindTest.java | 2 -
.../transport/tcp/TcpTransportServerTest.java | 3 -
.../activemq/transport/tcp/TransportUriTest.java | 3 -
.../transport/tcp/WireformatNegociationTest.java | 18 -
...eiveWithTwoConnectionsAndLargeMessagesTest.java | 4 -
.../udp/UdpSendReceiveWithTwoConnectionsTest.java | 3 -
.../activemq/transport/udp/UdpTestSupport.java | 3 -
.../activemq/transport/udp/UdpTransportTest.java | 4 -
.../transport/udp/UdpTransportUsingServerTest.java | 4 -
.../org/apache/activemq/util/MessageIdList.java | 10 -
.../java/org/apache/activemq/util/SocketProxy.java | 23 +-
.../MultiThreadRandomReattachTestBase.java | 8 +-
.../largemessage/LargeMessageTestBase.java | 17 -
.../tests/integration/ra/DummyTransaction.java | 7 -
.../integration/stomp/util/ClientStompFrame.java | 2 +-
.../stomp/util/ClientStompFrameV10.java | 2 +-
.../stomp/util/ClientStompFrameV12.java | 2 +-
.../stomp/util/StompFrameFactoryV11.java | 2 +-
.../core/journal/impl/JournalImplTestBase.java | 12 -
.../core/journal/impl/JournalImplTestUnit.java | 7 +-
.../impl/fakes/FakeSequentialFileFactory.java | 49 --
.../unit/core/postoffice/impl/fakes/FakeQueue.java | 7 -
.../artemis/tests/util/ActiveMQTestBase.java | 152 +----
.../activemq/artemis/tests/util/JMSTestBase.java | 16 +-
.../artemis/tests/util/SingleServerTestBase.java | 4 +-
.../activemq/artemis/tests/util/TcpProxy.java | 9 +-
.../activemq/artemis/utils/TestParameters.java | 4 +-
.../activemq/artemis/utils/network/NetUtil.java | 18 +-
.../activemq/transport/amqp/AmqpSupport.java | 4 +-
.../amqp/client/AmqpAbstractResource.java | 30 +-
.../activemq/transport/amqp/client/AmqpClient.java | 58 +-
.../transport/amqp/client/AmqpConnection.java | 19 +-
.../transport/amqp/client/AmqpEventSink.java | 3 +-
.../transport/amqp/client/AmqpFrameValidator.java | 3 +-
.../transport/amqp/client/AmqpMessage.java | 116 ++--
.../client/AmqpOperationTimedOutException.java | 3 +-
.../transport/amqp/client/AmqpReceiver.java | 225 +++----
.../amqp/client/AmqpRedirectedException.java | 10 +-
.../transport/amqp/client/AmqpResource.java | 45 +-
.../activemq/transport/amqp/client/AmqpSender.java | 76 +--
.../transport/amqp/client/AmqpSession.java | 119 ++--
.../transport/amqp/client/AmqpSupport.java | 17 +-
.../amqp/client/AmqpTransactionContext.java | 3 +-
.../amqp/client/AmqpTransactionCoordinator.java | 4 +-
.../amqp/client/AmqpTransferTagGenerator.java | 15 +-
.../transport/amqp/client/AmqpValidator.java | 4 +-
.../amqp/client/sasl/AbstractMechanism.java | 3 +-
.../transport/amqp/client/sasl/Mechanism.java | 42 +-
.../transport/amqp/client/sasl/PlainMechanism.java | 2 +-
.../amqp/client/sasl/SaslAuthenticator.java | 9 +-
.../transport/amqp/client/util/AsyncResult.java | 13 +-
.../client/util/ClientFutureSynchronization.java | 5 +-
.../amqp/client/util/IOExceptionSupport.java | 6 +-
.../transport/amqp/client/util/IdGenerator.java | 36 +-
.../transport/amqp/client/util/PropertyUtil.java | 83 ++-
.../amqp/client/util/StringArrayConverter.java | 7 +-
.../amqp/client/util/UnmodifiableProxy.java | 5 +-
.../transport/netty/NettyTcpTransport.java | 23 +-
.../transport/netty/NettyTransportFactory.java | 14 +-
.../transport/netty/NettyTransportListener.java | 9 +-
.../transport/netty/NettyTransportOptions.java | 40 +-
.../transport/netty/NettyTransportSslOptions.java | 97 +--
.../transport/netty/NettyTransportSupport.java | 65 +-
.../activemq/transport/netty/NettyWSTransport.java | 15 +-
.../transport/netty/X509AliasKeyManager.java | 5 +-
.../artemis/tests/compatibility/GroovyRun.java | 14 +-
.../tests/compatibility/HQClientTopologyTest.java | 4 +-
.../tests/compatibility/HQFailoverTest.java | 4 +-
.../compatibility/JournalCompatibilityTest.java | 9 +-
.../tests/compatibility/base/TestClassLoader.java | 7 +-
.../artemis/tests/db/paging/PagingTest.java | 26 +-
.../e2e/brokerConnection/ValidateContainer.java | 14 +-
.../artemis/tests/e2e/common/ContainerService.java | 8 +-
.../isolated/web/WebServerComponentTest.java | 7 +-
.../paging/impl/PagingManagerTestAccessor.java | 4 +-
.../server/cluster/impl/BridgeTestAccessor.java | 5 +-
.../artemis/tests/integration/InVMCloseTest.java | 31 +-
.../artemis/tests/integration/SimpleTest.java | 64 +-
.../tests/integration/SingleServerSimpleTest.java | 36 +-
.../tests/integration/String64KLimitTest.java | 7 +-
.../integration/addressing/AddressConfigTest.java | 6 +-
.../integration/amqp/AmqpClientTestSupport.java | 4 +-
.../amqp/AmqpDescribedTypePayloadTest.java | 4 +-
.../integration/amqp/AmqpExpiredMessageTest.java | 12 +-
.../integration/amqp/AmqpFlowControlTest.java | 4 +-
.../amqp/AmqpFullyQualifiedNameTest.java | 1 -
.../tests/integration/amqp/AmqpManagementTest.java | 1 -
.../integration/amqp/AmqpMessageRoutingTest.java | 6 +-
.../amqp/AmqpReceiverDispositionTest.java | 7 +-
.../amqp/AmqpTargetedFQQNSecurityTest.java | 4 +-
.../tests/integration/amqp/AmqpTestSupport.java | 3 +-
.../amqp/DLQAfterExpiredMessageTest.java | 5 +-
.../amqp/PropertyParseOptimizationTest.java | 4 +-
.../connect/AMQPFederationAddressPolicyTest.java | 3 +-
.../connect/AMQPFederationQueuePolicyTest.java | 3 +-
.../integration/amqp/connect/AMQPReplicaTest.java | 12 +-
.../integration/amqp/connect/AckManagerTest.java | 7 +-
.../amqp/connect/MirrorControllerBasicTest.java | 7 +-
.../integration/amqp/connect/PagedMirrorTest.java | 31 +-
.../amqp/connect/QpidDispatchPeerTest.java | 12 +-
.../amqp/connect/SNFPagedMirrorTest.java | 31 +-
.../amqp/connect/ValidateAMQPErrorsTest.java | 10 +-
.../largemessages/AmqpReplicatedTestSupport.java | 3 +-
.../tests/integration/amqp/sasl/SaslScramTest.java | 7 +-
.../tests/integration/client/AckBatchSizeTest.java | 9 +-
.../tests/integration/client/AcknowledgeTest.java | 6 +-
.../integration/client/ActiveMQCrashTest.java | 3 -
.../tests/integration/client/AutogroupIdTest.java | 21 +-
.../client/ConcurrentCreateDeleteProduceTest.java | 8 +-
.../integration/client/ConfirmationWindowTest.java | 37 +-
.../integration/client/ConsumerCloseTest.java | 1 -
.../integration/client/ConsumerFilterTest.java | 10 -
.../tests/integration/client/ConsumerTest.java | 4 -
.../integration/client/ConsumerWindowSizeTest.java | 22 +-
.../integration/client/ExpiryLargeMessageTest.java | 2 -
.../integration/client/FailureDeadlockTest.java | 4 +-
.../FlowControlOnIgnoreLargeMessageBodyTest.java | 3 -
.../tests/integration/client/HangConsumerTest.java | 54 +-
.../client/IncompatibleVersionTest.java | 4 +-
.../client/InterruptedLargeMessageTest.java | 4 -
.../client/JMSPagingFileDeleteTest.java | 5 -
.../integration/client/JmsNettyNioStressTest.java | 31 +-
.../tests/integration/client/JournalCrashTest.java | 4 -
.../client/LargeMessageCompressTest.java | 5 +-
.../tests/integration/client/LargeMessageTest.java | 6 -
.../client/LibaioDependencyCheckTest.java | 5 +-
.../integration/client/MessageBufferTest.java | 31 +-
.../client/MessageConsumerRollbackTest.java | 5 -
.../integration/client/MessagePriorityTest.java | 8 +-
.../client/MultipleThreadFilterOneTest.java | 10 +-
.../integration/client/ReceiveImmediateTest.java | 2 -
.../integration/client/RedeliveryConsumerTest.java | 4 -
.../integration/client/SessionCloseOnGCTest.java | 4 +-
.../client/SessionFactoryCloseTest.java | 7 +-
.../tests/integration/client/SessionTest.java | 2 +-
.../tests/integration/client/SlowConsumerTest.java | 11 +-
.../client/TransactionDurabilityTest.java | 2 -
.../integration/clientcrash/ClientCrashTest.java | 4 +-
.../integration/clientcrash/ClientExitTest.java | 13 +-
.../cluster/bridge/BridgeReconnectTest.java | 8 -
.../integration/cluster/bridge/BridgeTest.java | 9 -
.../bridge/BridgeWithDiscoveryGroupStartTest.java | 3 -
.../bridge/ClusteredBridgeReconnectTest.java | 6 +-
.../cluster/bridge/NettyBridgeReconnectTest.java | 3 -
.../crossprotocol/LargeHeadersClusterTest.java | 5 -
.../ProtocolsMessageLoadBalancingTest.java | 5 -
.../AnycastRoutingWithClusterTest.java | 8 +-
.../AutoDeleteClusteredDestinationTest.java | 32 +-
.../distribution/AutoDeleteDistributedTest.java | 9 +-
.../cluster/distribution/ClusterTestBase.java | 23 +-
.../distribution/ClusteredGroupingTest.java | 3 +-
.../distribution/MessageRedistributionTest.java | 8 +-
.../MessageRedistributionWithDiscoveryTest.java | 4 -
.../distribution/NettySymmetricClusterTest.java | 9 +-
.../distribution/OnewayTwoNodeClusterTest.java | 4 +-
.../RemoteBindingWithoutLoadBalancingTest.java | 5 +-
.../cluster/distribution/SymmetricClusterTest.java | 14 +-
.../distribution/TemporaryJMSQueueClusterTest.java | 31 +-
.../distribution/TemporaryQueueClusterTest.java | 5 +-
.../cluster/distribution/URISimpleClusterTest.java | 2 +-
.../cluster/failover/AsynchronousFailoverTest.java | 2 +-
.../cluster/failover/BackupSyncJournalTest.java | 7 -
.../failover/BackupSyncLargeMessageTest.java | 11 +-
.../ClusterWithBackupFailoverTestBase.java | 3 +-
.../cluster/failover/FailBackAutoTest.java | 6 -
.../cluster/failover/FailBackManualTest.java | 5 -
.../cluster/failover/FailoverListenerTest.java | 15 +-
.../integration/cluster/failover/FailoverTest.java | 14 -
.../cluster/failover/FailoverTestBase.java | 20 +-
.../cluster/failover/FakeServiceComponent.java | 4 +-
.../cluster/failover/LargeMessageFailoverTest.java | 8 -
...ltiplePrimariesMultipleBackupsFailoverTest.java | 2 -
.../failover/NettyReplicatedFailoverTest.java | 21 +-
.../failover/NetworkFailureFailoverTest.java | 7 +-
.../cluster/failover/PagingFailoverTest.java | 1 -
.../failover/PrimaryToPrimaryFailoverTest.java | 3 -
.../failover/QuorumFailOverPrimaryVotesTest.java | 6 +-
.../failover/ReplicatedDistributionTest.java | 4 -
.../cluster/failover/SecurityFailoverTest.java | 6 -
.../cluster/failover/SharedStoreBackupTest.java | 3 +-
.../SinglePrimaryMultipleBackupsFailoverTest.java | 2 -
...agerNettyNoGroupNameReplicatedFailoverTest.java | 4 +-
...eplicatedLargeMessageWithDelayFailoverTest.java | 3 +-
.../reattach/RandomReattachIntegrationTest.java | 3 -
.../integration/cluster/reattach/ReattachTest.java | 4 +-
.../cluster/topology/NonHATopologyTest.java | 5 +-
.../cluster/topology/TopologyClusterTestBase.java | 5 -
.../integration/cluster/util/BackupSyncDelay.java | 17 +-
.../cluster/util/RemoteServerConfiguration.java | 7 +-
.../consumer/DetectOrphanedConsumerTest.java | 4 +-
.../consumer/OrphanedConsumerDefenseTest.java | 8 +-
.../crossprotocol/OpenWireToAMQPTest.java | 4 +-
.../integration/discovery/DiscoveryBaseTest.java | 8 -
.../tests/integration/discovery/DiscoveryTest.java | 48 +-
.../integration/divert/PersistentDivertTest.java | 3 -
.../federation/FederatedAddressTest.java | 3 -
.../integration/federation/FederatedQueueTest.java | 3 -
.../integration/federation/FederatedTestBase.java | 3 -
.../integration/http/CoreClientOverHttpTest.java | 1 -
.../integration/interceptors/InterceptorTest.java | 3 -
.../jms/ActiveMQConnectionFactoryTest.java | 3 -
.../tests/integration/jms/FloodServerTest.java | 3 -
.../integration/jms/ProgrammaticRedeployTest.java | 2 +-
.../tests/integration/jms/RedeployTest.java | 11 +-
.../integration/jms/SimpleJNDIClientTest.java | 3 -
.../integration/jms/client/ConnectionTest.java | 1 -
.../integration/jms/client/ExclusiveTest.java | 3 -
.../tests/integration/jms/client/GroupingTest.java | 13 +-
.../tests/integration/jms/client/LVQTest.java | 3 -
.../jms/client/MessageProducerTest.java | 3 -
.../tests/integration/jms/client/MessageTest.java | 6 -
.../jms/client/NoLocalSubscriberTest.java | 5 +-
.../integration/jms/client/ReceiveNoWaitTest.java | 10 +-
.../jms/client/RemoteConnectionStressTest.java | 3 -
.../tests/integration/jms/client/RollbackTest.java | 31 +-
...ssionClosedOnRemotingConnectionFailureTest.java | 7 -
.../client/SessionMetadataAddExceptionTest.java | 3 +-
.../integration/jms/client/StoreConfigTest.java | 7 -
.../integration/jms/client/TopicCleanupTest.java | 6 +-
.../jms/cluster/JMSFailoverListenerTest.java | 5 +-
.../integration/jms/cluster/JMSFailoverTest.java | 8 +-
.../jms/cluster/LargeMessageOverBridgeTest.java | 10 -
.../connection/CloseDestroyedConnectionTest.java | 2 +-
.../jms/connection/ConcurrentSessionCloseTest.java | 1 -
.../ConnectionFactorySerializationTest.java | 2 +-
...nectionFactoryWithJGroupsSerializationTest.java | 10 +-
.../jms/connection/ExceptionListenerTest.java | 18 +-
.../integration/jms/consumer/JmsConsumerTest.java | 8 +-
.../jms/divert/DivertAndACKClientTest.java | 5 -
.../integration/jms/jms2client/JmsContextTest.java | 17 +-
.../JmsProducerCompletionListenerTest.java | 4 -
.../jms/multiprotocol/JMSFQQNConsumerTest.java | 3 +-
.../jms/server/JMSServerStartStopTest.java | 4 -
.../integration/journal/AIOJournalImplTest.java | 13 +-
.../journal/AIOUnbuferedJournalImplTest.java | 13 +-
.../integration/journal/DuplicateRecordIdTest.java | 31 +-
.../journal/JournalCompactSplitTest.java | 4 -
.../integration/journal/JournalDataPrintTest.java | 31 +-
.../integration/journal/NIOImportExportTest.java | 5 -
.../integration/journal/NIOJournalCompactTest.java | 2 +-
.../management/ManagementActivationTest.java | 24 +-
.../management/ManagementWithPagingServerTest.java | 4 +-
.../integration/management/QueueControlTest.java | 41 +-
.../management/QueueControlUsingCoreTest.java | 15 -
...urityManagementWithConfiguredAdminUserTest.java | 8 +-
.../artemis/tests/integration/mqtt/MQTTTest.java | 7 +-
.../tests/integration/mqtt/MQTTTestSupport.java | 6 +-
.../tests/integration/mqtt/PahoMQTTTest.java | 4 +-
.../mqtt/util/ResourceLoadingSslContext.java | 7 +-
.../artemis/tests/integration/mqtt5/MQTT5Test.java | 12 +-
.../tests/integration/mqtt5/package-info.java | 1 -
.../mqtt5/spec/ControlPacketFormatTests.java | 2 +-
.../integration/mqtt5/spec/DataFormatTests.java | 2 +-
.../mqtt5/spec/EnhancedAuthenticationTests.java | 2 +-
.../integration/mqtt5/spec/FlowControlTests.java | 2 +-
.../integration/mqtt5/spec/HandlingErrorTests.java | 6 +-
.../mqtt5/spec/MessageOrderingTests.java | 2 +-
.../mqtt5/spec/MessageReceiptTests.java | 4 +-
.../mqtt5/spec/NetworkConnectionTests.java | 2 +-
.../tests/integration/mqtt5/spec/QoSTests.java | 2 +-
.../integration/mqtt5/spec/SessionStateTests.java | 2 +-
.../integration/mqtt5/spec/SubscriptionTests.java | 6 +-
.../mqtt5/spec/TopicNameAndFilterTests.java | 2 +-
.../integration/mqtt5/spec/WebSocketTests.java | 3 +-
.../mqtt5/spec/controlpackets/AuthTests.java | 3 +-
.../mqtt5/spec/controlpackets/ConnAckTests.java | 7 +-
.../mqtt5/spec/controlpackets/ConnectTests.java | 2 +-
.../mqtt5/spec/controlpackets/DisconnectTests.java | 2 +-
.../mqtt5/spec/controlpackets/PubAckTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubCompTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubRecTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubRelTests.java | 2 +-
.../mqtt5/spec/controlpackets/PublishTests.java | 76 +--
.../mqtt5/spec/controlpackets/SubAckTests.java | 4 +-
.../mqtt5/spec/controlpackets/SubscribeTests.java | 24 +-
.../mqtt5/spec/controlpackets/UnsubAckTests.java | 2 +-
.../spec/controlpackets/UnsubscribeTests.java | 2 +-
.../mqtt5/spec/controlpackets/package-info.java | 1 -
.../ssl/CertificateAuthenticationSslTests.java | 4 +-
.../integration/openwire/BasicOpenWireTest.java | 5 -
.../integration/openwire/SimpleOpenWireTest.java | 4 -
.../integration/openwire/TempQueueWithDotTest.java | 13 +-
.../openwire/VerySimpleOenwireTest.java | 6 +-
.../openwire/amq/JMSDurableTopicRedeliverTest.java | 2 -
.../openwire/amq/JMSIndividualAckTest.java | 6 -
.../integration/openwire/amq/JmsAutoAckTest.java | 2 -
.../integration/openwire/amq/JmsClientAckTest.java | 8 -
.../openwire/amq/JmsConnectionStartStopTest.java | 10 +-
.../amq/JmsConsumerResetActiveListenerTest.java | 7 +-
.../amq/JmsCreateConsumerInOnMessageTest.java | 4 -
.../amq/JmsDurableTopicSendReceiveTest.java | 2 -
.../openwire/amq/JmsQueueBrowserTest.java | 7 +-
.../openwire/amq/JmsResourceProvider.java | 73 +-
.../openwire/amq/JmsSendReceiveTestSupport.java | 12 -
.../openwire/amq/JmsTopicRedeliverTest.java | 2 -
.../openwire/amq/JmsTopicRequestReplyTest.java | 5 +-
.../openwire/amq/JmsTransactionTestSupport.java | 58 +-
.../openwire/amq/RedeliveryPolicyTest.java | 30 -
.../openwire/interop/GeneralInteropTest.java | 7 +-
.../integration/paging/JournalPagingTest.java | 7 +-
.../integration/paging/PageCountSyncServer.java | 6 +-
.../paging/PageTransactionCleanupTest.java | 2 +-
.../integration/paging/PagingCounterTest.java | 5 -
.../tests/integration/paging/PagingOrderTest.java | 4 +-
.../tests/integration/paging/PagingSendTest.java | 18 +-
.../tests/integration/paging/PagingSyncTest.java | 2 +-
.../paging/PagingWithFailoverBackup.java | 4 +-
.../AddressSettingsConfigurationStorageTest.java | 4 -
.../persistence/JMSStorageManagerTest.java | 4 -
.../persistence/RolesConfigurationStorageTest.java | 4 -
.../persistence/StorageManagerTestBase.java | 11 -
.../persistence/XmlImportExportTest.java | 1 -
.../metrics/AbstractPersistentStatTestSupport.java | 9 -
.../tests/integration/plugin/CacheMetricsTest.java | 31 +-
.../tests/integration/plugin/JvmMetricsTest.java | 31 +-
.../integration/plugin/MetricsPluginTest.java | 31 +-
.../tests/integration/plugin/NettyMetricsTest.java | 31 +-
.../integration/plugin/SystemMetricsTest.java | 31 +-
.../integration/plugin/XmlConfigPluginTest.java | 2 -
.../integration/ra/ActiveMQClusteredTest.java | 8 +-
.../integration/ra/ActiveMQMessageHandlerTest.java | 4 -
.../tests/integration/ra/ResourceAdapterTest.java | 2 -
.../tests/integration/remoting/PingTest.java | 14 +-
.../integration/replication/ReplicationTest.java | 11 +-
.../SharedNothingReplicationFlowControlTest.java | 7 +-
.../integration/scheduling/DelayedMessageTest.java | 3 -
.../scheduling/MultipliedDelayedMessageTest.java | 3 -
.../scheduling/ScheduledMessageTest.java | 3 -
.../integration/security/JMSXUserIDPluginTest.java | 2 -
.../security/PersistedSecuritySettingTest.java | 31 +-
.../tests/integration/security/SecurityTest.java | 15 +-
.../integration/server/AIOFileLockTimeoutTest.java | 9 +-
.../integration/server/NIOFileLockTimeoutTest.java | 9 +-
.../server/PotentialOOMELoggingTest.java | 8 +-
.../integration/server/RetroactiveAddressTest.java | 31 +-
.../integration/server/ScaleDownDirectTest.java | 4 +-
.../integration/server/SimpleStartStopTest.java | 8 +-
.../ssl/CoreClientOverOneWaySSLTest.java | 17 +-
.../artemis/tests/integration/stomp/StompTest.java | 5 -
.../tests/integration/stomp/StompTestBase.java | 4 -
.../stomp/StompWithClientIdValidationTest.java | 4 +-
.../artemis/tests/integration/xa/BasicXaTest.java | 4 -
.../tests/integration/xa/XaTimeoutTest.java | 12 +-
.../artemis/tests/util/JMSClusteredTestBase.java | 12 -
.../tests/util/TransportConfigurationUtils.java | 5 -
.../artemis/jms/tests/AcknowledgementTest.java | 6 +-
.../artemis/jms/tests/CTSMiscellaneousTest.java | 3 +-
.../artemis/jms/tests/ConnectionClosedTest.java | 11 +-
.../artemis/jms/tests/ConnectionFactoryTest.java | 7 +-
.../activemq/artemis/jms/tests/ConnectionTest.java | 4 -
.../artemis/jms/tests/DurableSubscriptionTest.java | 20 +-
.../artemis/jms/tests/MessageConsumerTest.java | 19 +-
.../artemis/jms/tests/MessageProducerTest.java | 3 -
.../jms/tests/MessageWithReadResolveTest.java | 9 +-
.../artemis/jms/tests/MiscellaneousTest.java | 7 -
.../jms/tests/NonDurableSubscriberTest.java | 2 -
.../artemis/jms/tests/PersistenceTest.java | 4 +-
.../activemq/artemis/jms/tests/QueueTest.java | 2 -
.../artemis/jms/tests/ReferenceableTest.java | 2 +-
.../activemq/artemis/jms/tests/SecurityTest.java | 6 +-
.../jms/tests/TemporaryDestinationTest.java | 13 +-
.../activemq/artemis/jms/tests/TopicTest.java | 3 -
.../artemis/jms/tests/TransactedSessionTest.java | 9 +-
.../tests/message/BodyIsAssignableFromTest.java | 10 -
.../jms/tests/message/BytesMessageTest.java | 2 -
.../jms/tests/message/JMSReplyToHeaderTest.java | 5 -
.../jms/tests/message/MessageHeaderTest.java | 178 -----
.../tests/message/ObjectMessageDeliveryTest.java | 8 -
.../jms/tests/message/SimpleJMSBytesMessage.java | 4 -
.../jms/tests/message/SimpleJMSMapMessage.java | 3 -
.../jms/tests/message/SimpleJMSMessage.java | 4 +-
.../artemis/jms/tests/selector/SelectorTest.java | 15 +-
.../artemis/jms/tests/tools/ServerManagement.java | 12 +-
.../tools/container/InVMInitialContextFactory.java | 2 +-
.../artemis/jms/tests/tools/container/Server.java | 78 +--
.../artemis/amqpJMS/ActiveMQAMQPAdmin.java | 3 -
.../artemis/amqpJMS/JoramAMQPAggregationTest.java | 2 -
.../activemq/artemis/common/AbstractAdmin.java | 8 +-
.../artemis/common/testjndi/TestContext.java | 43 +-
.../common/testjndi/TestContextFactory.java | 7 +-
.../artemis/jms/JoramCoreAggregationTest.java | 2 -
.../java/org/objectweb/jtests/jms/admin/Admin.java | 62 +-
.../jms/conform/connection/ConnectionTest.java | 12 +-
.../conform/connection/TopicConnectionTest.java | 56 +-
.../jms/conform/message/MessageBodyTest.java | 9 +-
.../jms/conform/message/MessageDefaultTest.java | 9 +-
.../jms/conform/message/MessageTypeTest.java | 105 ++-
.../conform/message/headers/MessageHeaderTest.java | 42 +-
.../message/properties/JMSXPropertyTest.java | 10 +-
.../properties/MessagePropertyConversionTest.java | 313 ++++-----
.../message/properties/MessagePropertyTest.java | 63 +-
.../jtests/jms/conform/queue/QueueBrowserTest.java | 14 +-
.../jms/conform/queue/TemporaryQueueTest.java | 6 -
.../jms/conform/selector/SelectorSyntaxTest.java | 30 +-
.../jtests/jms/conform/selector/SelectorTest.java | 49 +-
.../jms/conform/session/QueueSessionTest.java | 21 +-
.../jtests/jms/conform/session/SessionTest.java | 42 +-
.../jms/conform/session/TopicSessionTest.java | 24 +-
.../jms/conform/session/UnifiedSessionTest.java | 56 +-
.../jms/conform/topic/TemporaryTopicTest.java | 6 -
.../jtests/jms/framework/JMSTestCase.java | 18 +-
.../jtests/jms/framework/PTPTestCase.java | 38 +-
.../jtests/jms/framework/PubSubTestCase.java | 38 +-
.../objectweb/jtests/jms/framework/TestConfig.java | 4 +-
.../jtests/jms/framework/UnifiedTestCase.java | 51 +-
.../artemis/tests/leak/FilteredPagingLeakTest.java | 7 +-
.../artemis/tests/leak/JournalLeakTest.java | 5 +-
.../artemis/tests/leak/MemoryAssertions.java | 4 +-
.../tests/leak/MessageReferenceLeakTest.java | 33 +-
.../artemis/tests/leak/PagingLeakTest.java | 5 +-
.../performance/journal/FakeJournalImplTest.java | 3 -
.../paging/MeasurePagingMultiThreadTest.java | 18 -
.../sends/AbstractSendReceivePerfTest.java | 5 +-
.../performance/sends/MeasureCommitPerfTest.java | 2 +-
.../BrokerConnectionBridgeSecurityTest.java | 31 +-
.../BrokerConnectionMirrorSecurityTest.java | 31 +-
.../smoke/brokerConnection/DualFederationTest.java | 31 +-
.../DualMirrorNoContainerTest.java | 31 +-
.../MirrorInfiniteRetryReplicaTest.java | 8 +-
.../brokerConnection/MirroredSubscriptionTest.java | 31 +-
.../brokerConnection/PagedMirrorSmokeTest.java | 31 +-
.../artemis/tests/smoke/console/ConsoleTest.java | 4 +-
.../artemis/tests/smoke/jmx/JmxConnectionTest.java | 34 +-
.../smoke/resourcetest/MaxQueueResourceTest.java | 31 +-
.../smoke/upgradeTest/CompareUpgradeTest.java | 4 +-
.../tests/smoke/upgradeTest/UpgradeTest.java | 35 +-
.../artemis/tests/soak/client/ClientAbstract.java | 12 +-
.../artemis/tests/soak/client/Receiver.java | 12 -
.../activemq/artemis/tests/soak/client/Sender.java | 9 -
.../ClusterNotificationsContinuityTest.java | 42 +-
.../soak/interrupt/JournalFlushInterruptTest.java | 33 +-
.../soak/interruptlm/LargeMessageFrozenTest.java | 4 +-
.../artemis/tests/soak/owleak/OWLeakTest.java | 6 +-
.../tests/soak/paging/FlowControlPagingTest.java | 6 +-
.../tests/soak/paging/HorizontalPagingTest.java | 7 +-
.../tests/soak/paging/MegaCleanerPagingTest.java | 2 +-
.../tests/soak/paging/SubscriptionPagingTest.java | 9 +-
.../soak/replicaTxCheck/ReplicaTXCheckTest.java | 7 +-
.../journal/AIOMultiThreadCompactorStressTest.java | 3 -
.../journal/JournalCleanupCompactStressTest.java | 7 +-
.../stress/journal/JournalRestartStressTest.java | 12 +-
.../stress/journal/LargeJournalStressTest.java | 3 -
.../stress/journal/MixupCompactorTestBase.java | 4 -
.../journal/MultiThreadConsumerStressTest.java | 2 +-
.../journal/NIOMultiThreadCompactorStressTest.java | 15 -
.../tests/stress/paging/PageCursorStressTest.java | 27 -
.../tests/stress/remote/PingStressTest.java | 4 +-
.../core/server/impl/QueueConcurrentTest.java | 4 +-
.../asyncio/MultiThreadAsynchronousFileTest.java | 10 +-
.../core/client/impl/LargeMessageBufferTest.java | 44 +-
.../core/config/impl/ConnectorsServiceTest.java | 6 -
.../unit/core/journal/impl/TimedBufferTest.java | 8 +-
.../tests/unit/core/paging/impl/PageTest.java | 7 -
.../core/paging/impl/PagingManagerImplTest.java | 7 +-
.../unit/core/paging/impl/PagingStoreImplTest.java | 9 +-
.../core/postoffice/impl/BindingsImplTest.java | 47 --
.../impl/WildcardAddressManagerUnitTest.java | 23 +-
.../impl/netty/ChannelBufferWrapper2Test.java | 2 -
.../remoting/impl/netty/NettyConnectorTest.java | 1 -
.../impl/ActiveMQSecurityManagerImplTest.java | 3 -
.../tests/unit/core/server/impl/QueueImplTest.java | 4 -
.../tests/unit/logging/AssertionLoggerTest.java | 6 +-
.../unit/ra/ActiveMQResourceAdapterConfigTest.java | 11 +-
.../unit/ra/ConnectionFactoryPropertiesTest.java | 3 +-
.../artemis/tests/unit/util/FakePagingManager.java | 22 -
.../artemis/tests/unit/util/LinkedListTest.java | 5 +-
.../artemis/tests/unit/util/ReusableLatchTest.java | 12 +-
1517 files changed, 11178 insertions(+), 21586 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
(activemq-artemis) 03/03: ARTEMIS-5314 overhaul JavaDoc formatting & content
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 5b122779947d402cfebc2997c4c8c1ea08c4d161
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Thu Feb 13 17:58:48 2025 -0600
ARTEMIS-5314 overhaul JavaDoc formatting & content
This commit overhauls JavaDoc formatting & content across the entire
code-base placing a heavy emphasis on the don't-repeat-yourself
principle (i.e. DRY).
The main goals here are readability, conciseness, and safeguarding
future commits from the same kinds of mistakes that have plagued the
code-base for many years now.
It includes the following changes:
- Remove empty @param, @throws, & @return tags.
- Remove useless/boilerplate comments.
- Re-wrap to 120 characters. Many comments already used this limit
while others were less than and still other were more than this
limit. Using 120 was a happy medium.
- Enforce multi-line syntax, e.g.:
/**
* Lorem ipsum
*/
- Change /** to /* where appropriate (e.g. license headers,
intra-method comments, etc.)
- Change /* to /** where appropriate (e.g. method descriptions,
comments using tags like @code, etc.)
- Remove trailing or extraneous '*' characters.
- Remove JavaDocs from implementations when the JavaDocs of the
interface will suffice.
- Use {@code Lorem ipsum} syntax where appropriate.
- Use <p> for empty lines. Remove <br>, <br/>, & <br />
- Use the {@return ...} sytanx introduced in Java 16. Details are at
https://bugs.openjdk.org/browse/JDK-8256804.
- Align @param descriptions.
- Align @throws descriptions.
- Add empty line between description and start of tags (e.g. @param).
- Fix the prolific "whether or not" to the more correct just "whether".
- Enforce many of these standards via checkstyle.
- Remove references to defunct issue trackers or forums.
- Convert single line comments using /* syntax to use //.
---
.../org/apache/activemq/artemis/boot/Artemis.java | 5 +-
.../configuration/ArtemisClientConfiguration.java | 16 +-
.../org/apache/activemq/artemis/cli/Artemis.java | 18 +-
.../artemis/cli/commands/ActionAbstract.java | 16 +-
.../artemis/cli/commands/Configurable.java | 2 +-
.../artemis/cli/commands/InputAbstract.java | 5 +-
.../apache/activemq/artemis/cli/commands/Run.java | 8 +-
.../artemis/cli/commands/helper/HelperCreate.java | 10 +-
.../messages/perf/AsyncJms2ProducerFacade.java | 4 +-
.../messages/perf/PaddingDecimalFormat.java | 4 +-
.../artemis/cli/commands/tools/PrintData.java | 6 -
.../cli/commands/tools/xml/XMLMessageExporter.java | 4 +-
.../cli/commands/tools/xml/XMLMessageImporter.java | 9 +-
.../cli/commands/tools/xml/XmlDataConstants.java | 4 +-
.../cli/commands/tools/xml/XmlDataExporter.java | 14 +-
.../cli/commands/tools/xml/XmlDataImporter.java | 20 +-
.../artemis/cli/commands/user/AddUser.java | 2 +-
.../artemis/cli/commands/user/RemoveUser.java | 2 +
.../artemis/cli/commands/user/ResetUser.java | 2 +
.../artemis/cli/commands/util/SyncCalculation.java | 18 +-
.../artemis/cli/process/ProcessBuilder.java | 4 -
.../activemq/artemis/integration/FileBroker.java | 8 +-
.../apache/activemq/artemis/util/ServerUtil.java | 13 +-
.../activemq/artemis/cli/commands/CreateTest.java | 2 +-
.../org/apache/activemq/cli/test/ArtemisTest.java | 4 +-
.../activemq/artemis/api/core/ActiveMQBuffer.java | 743 +++++++++------------
.../activemq/artemis/api/core/ActiveMQBuffers.java | 4 +-
.../artemis/api/core/ActiveMQException.java | 6 +-
.../api/core/ActiveMQIllegalStateException.java | 4 +-
...ActiveMQInterceptorRejectedPacketException.java | 1 -
.../ActiveMQLargeMessageInterruptedException.java | 3 -
.../artemis/api/core/ActiveMQNativeIOError.java | 1 -
.../api/core/ActiveMQObjectClosedException.java | 3 +-
.../core/ActiveMQRemoteDisconnectException.java | 2 +-
.../core/ActiveMQReplicationTimeooutException.java | 4 +-
.../api/core/ActiveMQSecurityException.java | 2 +-
.../api/core/ActiveMQSessionCreationException.java | 4 +-
.../artemis/api/core/ParameterisedAddress.java | 20 +-
.../artemis/api/core/QueueConfiguration.java | 42 +-
.../activemq/artemis/api/core/SimpleString.java | 62 +-
.../artemis/core/persistence/Persister.java | 10 +-
.../artemis/core/persistence/PersisterIDs.java | 11 +-
.../core/server/ActiveMQScheduledComponent.java | 50 +-
.../artemis/core/server/NetworkHealthCheck.java | 6 +-
.../apache/activemq/artemis/json/JsonArray.java | 101 +--
.../apache/activemq/artemis/json/JsonNumber.java | 5 +-
.../apache/activemq/artemis/json/JsonObject.java | 41 +-
.../activemq/artemis/json/JsonObjectBuilder.java | 96 +--
.../apache/activemq/artemis/json/JsonValue.java | 1 -
.../apache/activemq/artemis/logs/AuditLogger.java | 21 +-
.../artemis/utils/AbstractByteBufPool.java | 18 +-
.../activemq/artemis/utils/AbstractPool.java | 8 +-
.../artemis/utils/ActiveMQThreadFactory.java | 12 +-
.../activemq/artemis/utils/ArtemisCloseable.java | 4 +-
.../activemq/artemis/utils/AutomaticLatch.java | 10 +-
.../apache/activemq/artemis/utils/ByteUtil.java | 17 +-
.../activemq/artemis/utils/ClassloadingUtil.java | 5 +-
.../activemq/artemis/utils/ConcurrentUtil.java | 3 +-
.../artemis/utils/DefaultSensitiveStringCodec.java | 20 +-
.../org/apache/activemq/artemis/utils/Env.java | 14 +-
.../activemq/artemis/utils/FactoryFinder.java | 18 +-
.../apache/activemq/artemis/utils/FileUtil.java | 6 +-
.../activemq/artemis/utils/HashProcessor.java | 6 +-
.../apache/activemq/artemis/utils/IPV6Util.java | 3 +-
.../apache/activemq/artemis/utils/JsonLoader.java | 4 +-
.../artemis/utils/PasswordMaskingUtil.java | 33 +-
.../apache/activemq/artemis/utils/PendingTask.java | 5 +-
.../activemq/artemis/utils/PowerOf2Util.java | 12 +-
.../activemq/artemis/utils/Preconditions.java | 27 +-
.../apache/activemq/artemis/utils/RandomUtil.java | 6 +-
.../activemq/artemis/utils/ReferenceCounter.java | 6 +-
.../artemis/utils/ReferenceCounterUtil.java | 4 +-
.../activemq/artemis/utils/ReusableLatch.java | 29 +-
.../activemq/artemis/utils/SelectorTranslator.java | 16 +-
.../activemq/artemis/utils/SensitiveDataCodec.java | 4 +-
.../activemq/artemis/utils/SizeAwareMetric.java | 4 +-
.../activemq/artemis/utils/SpawnedVMSupport.java | 35 +-
.../activemq/artemis/utils/StringEscapeUtils.java | 7 +-
.../apache/activemq/artemis/utils/Suppliers.java | 19 +-
.../apache/activemq/artemis/utils/TimeUtils.java | 3 -
.../apache/activemq/artemis/utils/UTF8Util.java | 2 +-
.../org/apache/activemq/artemis/utils/UUID.java | 58 +-
.../activemq/artemis/utils/UUIDGenerator.java | 24 +-
.../apache/activemq/artemis/utils/UUIDTimer.java | 166 ++---
.../org/apache/activemq/artemis/utils/Waiter.java | 6 +-
.../artemis/utils/actors/ArtemisExecutor.java | 31 +-
.../activemq/artemis/utils/actors/HandlerBase.java | 11 +-
.../artemis/utils/actors/OrderedExecutor.java | 6 +-
.../utils/actors/OrderedExecutorFactory.java | 5 +-
.../artemis/utils/actors/ProcessorBase.java | 29 +-
.../activemq/artemis/utils/bean/MetaBean.java | 32 +-
.../utils/collections/ArrayResettableIterator.java | 6 +-
.../ConcurrentAppendOnlyChunkedList.java | 17 +-
.../utils/collections/ConcurrentHashSet.java | 2 +-
.../utils/collections/ConcurrentLongHashMap.java | 4 +-
.../utils/collections/ConcurrentLongHashSet.java | 3 +-
.../artemis/utils/collections/LinkedList.java | 8 +-
.../artemis/utils/collections/LinkedListImpl.java | 26 +-
.../utils/collections/LinkedListIterator.java | 7 +-
.../artemis/utils/collections/LongHashSet.java | 35 +-
.../utils/collections/MultiResettableIterator.java | 4 +-
.../artemis/utils/collections/NoOpMap.java | 6 +-
.../artemis/utils/collections/NodeStore.java | 17 +-
.../utils/collections/PriorityCollection.java | 10 +-
.../utils/collections/PriorityLinkedList.java | 16 +-
.../utils/collections/ResettableIterator.java | 4 +-
.../utils/collections/SparseArrayLinkedList.java | 19 +-
.../artemis/utils/collections/TypedProperties.java | 9 +-
.../utils/collections/UpdatableIterator.java | 15 +-
.../utils/critical/CriticalAnalyzerImpl.java | 3 +-
.../artemis/utils/critical/CriticalCloseable.java | 13 +-
.../artemis/utils/critical/CriticalComponent.java | 14 +-
.../utils/critical/CriticalComponentImpl.java | 4 +-
.../activemq/artemis/utils/pools/MpscPool.java | 9 +-
.../apache/activemq/artemis/utils/pools/Pool.java | 9 +-
.../activemq/artemis/utils/uri/URIFactory.java | 18 +-
.../activemq/artemis/utils/uri/URISchema.java | 7 +-
.../activemq/artemis/utils/uri/URISupport.java | 91 ++-
.../activemq/artemis/utils/URIParserTest.java | 8 -
.../artemis/utils/actors/ThresholdActorTest.java | 5 +-
.../artemis/utils/collections/LongHashSetTest.java | 5 +-
.../api/config/ActiveMQDefaultConfiguration.java | 116 ++--
.../activemq/artemis/api/core/BaseInterceptor.java | 5 +-
.../artemis/api/core/BroadcastEndpoint.java | 30 +-
.../api/core/BroadcastGroupConfiguration.java | 4 +-
.../api/core/ChannelBroadcastEndpointFactory.java | 2 +-
.../api/core/DiscoveryGroupConfiguration.java | 27 +-
.../activemq/artemis/api/core/FilterConstants.java | 4 +-
.../activemq/artemis/api/core/ICoreMessage.java | 42 +-
.../activemq/artemis/api/core/Interceptor.java | 6 +-
.../artemis/api/core/JGroupsBroadcastEndpoint.java | 6 +-
.../api/core/JGroupsChannelBroadcastEndpoint.java | 2 +-
.../apache/activemq/artemis/api/core/Message.java | 279 +++++---
.../activemq/artemis/api/core/RefCountMessage.java | 40 +-
.../artemis/api/core/RefCountMessageListener.java | 3 +-
.../artemis/api/core/TransportConfiguration.java | 45 +-
.../api/core/TrustManagerFactoryPlugin.java | 3 +-
.../api/core/UDPBroadcastEndpointFactory.java | 5 +-
.../artemis/api/core/client/ActiveMQClient.java | 105 ++-
.../artemis/api/core/client/ClientConsumer.java | 50 +-
.../artemis/api/core/client/ClientMessage.java | 48 +-
.../artemis/api/core/client/ClientProducer.java | 88 +--
.../artemis/api/core/client/ClientRequestor.java | 19 +-
.../artemis/api/core/client/ClientSession.java | 485 +++++++-------
.../api/core/client/ClientSessionFactory.java | 90 +--
.../api/core/client/ClusterTopologyListener.java | 14 +-
.../api/core/client/FailoverEventListener.java | 3 +-
.../artemis/api/core/client/MessageHandler.java | 4 +-
.../core/client/SendAcknowledgementHandler.java | 24 +-
.../artemis/api/core/client/ServerLocator.java | 323 +++++----
.../api/core/client/SessionFailureListener.java | 2 +-
.../artemis/api/core/client/TopologyMember.java | 42 +-
.../RandomConnectionLoadBalancingPolicy.java | 4 +-
.../RandomStickyConnectionLoadBalancingPolicy.java | 3 +-
.../RoundRobinConnectionLoadBalancingPolicy.java | 7 +-
.../artemis/api/core/jgroups/JChannelManager.java | 9 +-
.../artemis/api/core/jgroups/JChannelWrapper.java | 5 +-
.../artemis/api/core/jgroups/JGroupsReceiver.java | 3 +-
.../api/core/management/AcceptorControl.java | 11 +-
.../core/management/ActiveMQComponentControl.java | 2 +-
.../api/core/management/ActiveMQServerControl.java | 525 +++++++--------
.../api/core/management/AddressControl.java | 113 ++--
.../artemis/api/core/management/Attribute.java | 3 +-
.../core/management/BaseBroadcastGroupControl.java | 8 +-
.../artemis/api/core/management/BridgeControl.java | 51 +-
.../api/core/management/BroadcastGroupControl.java | 6 +-
.../core/management/BrokerConnectionControl.java | 14 +-
.../core/management/ClusterConnectionControl.java | 72 +-
.../api/core/management/DayCounterInfo.java | 15 +-
.../artemis/api/core/management/DivertControl.java | 31 +-
.../JGroupsChannelBroadcastGroupControl.java | 2 +-
.../JGroupsFileBroadcastGroupControl.java | 6 +-
.../api/core/management/ManagementHelper.java | 37 +-
.../api/core/management/MessageCounterInfo.java | 28 +-
.../artemis/api/core/management/NodeInfo.java | 8 +-
.../api/core/management/ObjectNameBuilder.java | 54 +-
.../artemis/api/core/management/Operation.java | 3 +-
.../artemis/api/core/management/Parameter.java | 3 +-
.../artemis/api/core/management/QueueControl.java | 203 +++---
.../management/RemoteBrokerConnectionControl.java | 10 +-
.../artemis/api/core/management/ResourceNames.java | 6 +-
.../artemis/api/core/management/RoleInfo.java | 30 +-
.../api/core/management/SimpleManagement.java | 20 +-
.../impl/ResetLimitWrappedActiveMQBuffer.java | 2 -
.../artemis/core/client/ActiveMQClientLogger.java | 5 +-
.../client/impl/AfterConnectInternalListener.java | 5 +-
.../core/client/impl/ClientConsumerImpl.java | 32 +-
.../core/client/impl/ClientConsumerInternal.java | 3 -
.../core/client/impl/ClientLargeMessageImpl.java | 10 +-
.../core/client/impl/ClientMessageImpl.java | 19 +-
.../core/client/impl/ClientMessageInternal.java | 9 -
.../client/impl/ClientProducerCreditManager.java | 6 +-
.../impl/ClientProducerCreditManagerImpl.java | 3 -
.../core/client/impl/ClientProducerImpl.java | 32 +-
.../core/client/impl/ClientProducerInternal.java | 3 -
.../core/client/impl/ClientSessionFactoryImpl.java | 22 +-
.../client/impl/ClientSessionFactoryInternal.java | 4 +-
.../core/client/impl/ClientSessionImpl.java | 152 +----
.../core/client/impl/ClientSessionInternal.java | 14 +-
.../impl/CompressedLargeMessageControllerImpl.java | 3 -
.../core/client/impl/LargeMessageController.java | 2 +-
.../client/impl/LargeMessageControllerImpl.java | 32 +-
.../core/client/impl/ServerLocatorImpl.java | 42 +-
.../core/client/impl/ServerLocatorInternal.java | 8 +-
.../artemis/core/client/impl/Topology.java | 38 +-
.../core/client/impl/TopologyMemberImpl.java | 10 +-
.../artemis/core/cluster/DiscoveryGroup.java | 15 +-
.../core/config/TransformerConfiguration.java | 6 +-
.../artemis/core/message/LargeBodyReader.java | 8 +-
.../artemis/core/message/impl/CoreMessage.java | 40 +-
.../core/message/impl/CoreMessagePersister.java | 8 +-
.../core/message/impl/MessageInternalImpl.java | 82 +--
.../artemis/core/protocol/core/Channel.java | 95 ++-
.../artemis/core/protocol/core/ChannelHandler.java | 4 +-
.../core/protocol/core/CoreRemotingConnection.java | 34 +-
.../artemis/core/protocol/core/Packet.java | 36 +-
.../core/impl/ActiveMQClientProtocolManager.java | 12 +-
.../protocol/core/impl/ActiveMQSessionContext.java | 5 -
.../core/impl/BackwardsCompatibilityUtils.java | 8 +-
.../core/protocol/core/impl/ChannelImpl.java | 15 +-
.../core/protocol/core/impl/PacketImpl.java | 4 +-
.../protocol/core/impl/RemotingConnectionImpl.java | 15 +-
.../wireformat/ClusterTopologyChangeMessage.java | 3 -
.../ClusterTopologyChangeMessage_V2.java | 6 -
.../core/impl/wireformat/CreateQueueMessage.java | 3 -
.../core/protocol/core/impl/wireformat/Ping.java | 4 +-
.../core/impl/wireformat/QueueAbstractPacket.java | 5 +-
.../core/impl/wireformat/RollbackMessage.java | 6 -
.../impl/wireformat/SessionAddMetaDataMessage.java | 2 +-
.../wireformat/SessionAddMetaDataMessageV2.java | 2 +-
.../SessionBindingQueryResponseMessage.java | 3 -
.../wireformat/SessionContinuationMessage.java | 16 +-
.../wireformat/SessionForceConsumerDelivery.java | 3 -
.../SessionReceiveContinuationMessage.java | 9 -
.../wireformat/SessionReceiveLargeMessage.java | 5 +-
.../wireformat/SessionSendContinuationMessage.java | 27 +-
.../SessionSendContinuationMessage_V2.java | 8 -
.../SessionSendContinuationMessage_V3.java | 8 -
.../core/impl/wireformat/SessionSendMessage.java | 16 +-
.../impl/wireformat/SessionSendMessage_V2.java | 4 +-
.../impl/wireformat/SessionSendMessage_V3.java | 4 +-
.../SubscribeClusterTopologyUpdatesMessageV2.java | 3 -
.../artemis/core/remoting/CloseListener.java | 3 +-
.../artemis/core/remoting/FailureListener.java | 4 +-
.../remoting/impl/TransportConfigurationUtil.java | 12 +-
.../remoting/impl/netty/CheckDependencies.java | 4 +-
.../core/remoting/impl/netty/NettyConnection.java | 8 +-
.../core/remoting/impl/netty/NettyConnector.java | 5 +-
.../remoting/impl/netty/TransportConstants.java | 30 +-
.../impl/ssl/CachingOpenSSLContextFactory.java | 10 +-
.../impl/ssl/CachingSSLContextFactory.java | 14 +-
.../impl/ssl/DefaultOpenSSLContextFactory.java | 6 +-
.../artemis/core/remoting/impl/ssl/SSLSupport.java | 24 +-
.../activemq/artemis/core/security/Role.java | 8 -
.../server/ComponentConfigurationRoutingType.java | 4 +-
.../server/management/NotificationService.java | 8 +-
.../artemis/core/transaction/impl/XidImpl.java | 6 -
.../activemq/artemis/reader/BytesMessageUtil.java | 6 +-
.../activemq/artemis/reader/MessageUtil.java | 2 +-
.../activemq/artemis/reader/StreamMessageUtil.java | 11 +-
.../core/protocol/AbstractRemotingConnection.java | 4 +-
.../spi/core/protocol/RemotingConnection.java | 71 +-
.../spi/core/remoting/AbstractConnector.java | 3 -
.../remoting/BaseConnectionLifeCycleListener.java | 12 +-
.../artemis/spi/core/remoting/BufferDecoder.java | 9 +-
.../artemis/spi/core/remoting/BufferHandler.java | 3 +-
.../spi/core/remoting/ClientProtocolManager.java | 4 +-
.../remoting/ClientProtocolManagerFactory.java | 4 +-
.../artemis/spi/core/remoting/Connection.java | 55 +-
.../artemis/spi/core/remoting/Connector.java | 23 +-
.../spi/core/remoting/ConnectorFactory.java | 2 +-
.../artemis/spi/core/remoting/SessionContext.java | 37 +-
.../core/remoting/ssl/OpenSSLContextFactory.java | 21 +-
.../ssl/OpenSSLContextFactoryProvider.java | 5 +-
.../spi/core/remoting/ssl/SSLContextConfig.java | 6 +-
.../spi/core/remoting/ssl/SSLContextFactory.java | 22 +-
.../remoting/ssl/SSLContextFactoryProvider.java | 6 +-
.../InVMTransportConfigurationSchema.java | 3 +-
.../schema/serverLocator/ConnectionOptions.java | 5 +-
.../artemis/utils/ActiveMQBufferInputStream.java | 8 -
.../activemq/artemis/utils/AutoCreateUtil.java | 15 +-
.../activemq/artemis/utils/BufferHelper.java | 12 -
.../artemis/utils/ConfirmationWindowWarning.java | 3 -
.../activemq/artemis/utils/DeflaterReader.java | 9 +-
.../apache/activemq/artemis/utils/IDGenerator.java | 10 +-
.../activemq/artemis/utils/InflaterReader.java | 9 +-
.../activemq/artemis/utils/InflaterWriter.java | 9 +-
.../apache/activemq/artemis/utils/JNDIUtil.java | 7 +-
.../utils/ObjectInputStreamWithClassLoader.java | 38 +-
.../apache/activemq/artemis/utils/PrefixUtil.java | 6 +-
.../artemis/utils/TimeAndCounterIDGenerator.java | 4 +-
.../activemq/artemis/utils/TokenBucketLimiter.java | 2 +-
.../artemis/utils/TokenBucketLimiterImpl.java | 6 +-
.../org/apache/activemq/artemis/utils/XMLUtil.java | 3 +-
.../remoting/impl/netty/TransportConstantTest.java | 5 +-
.../activemq/artemis/message/CoreMessageTest.java | 26 +-
.../apache/activemq/artemis/dto/RequestLogDTO.java | 3 +-
.../artemis/jdbc/store/drivers/JDBCUtils.java | 6 +-
.../jdbc/store/file/JDBCSequentialFile.java | 17 +-
.../file/JDBCSequentialFileFactoryDriver.java | 34 -
.../store/file/PostgresLargeObjectManager.java | 3 +-
.../artemis/jdbc/store/file/ScheduledWrite.java | 4 +-
.../jdbc/store/journal/JDBCJournalImpl.java | 12 +-
.../store/journal/JDBCJournalLoaderCallback.java | 6 +-
.../jdbc/store/sql/PropertySQLProvider.java | 4 +-
.../store/file/JDBCSequentialFileFactoryTest.java | 2 -
.../artemis/api/jms/ActiveMQJMSClient.java | 69 +-
.../activemq/artemis/api/jms/JMSFactoryType.java | 67 +-
.../api/jms/management/JMSManagementHelper.java | 33 +-
.../artemis/jms/client/ActiveMQConnection.java | 45 +-
.../jms/client/ActiveMQConnectionFactory.java | 34 +-
.../artemis/jms/client/ActiveMQDestination.java | 10 +-
.../artemis/jms/client/ActiveMQJMSContext.java | 9 +-
.../artemis/jms/client/ActiveMQJMSProducer.java | 13 +-
.../artemis/jms/client/ActiveMQMapMessage.java | 15 +-
.../artemis/jms/client/ActiveMQMessage.java | 33 +-
.../jms/client/ActiveMQMessageConsumer.java | 4 +-
.../jms/client/ActiveMQMessageProducer.java | 10 +-
.../artemis/jms/client/ActiveMQObjectMessage.java | 2 +-
.../activemq/artemis/jms/client/ActiveMQQueue.java | 7 +-
.../artemis/jms/client/ActiveMQSession.java | 172 ++++-
.../artemis/jms/client/ActiveMQTemporaryQueue.java | 6 +-
.../artemis/jms/client/ActiveMQTextMessage.java | 2 -
.../activemq/artemis/jms/client/ActiveMQTopic.java | 7 +-
.../artemis/jms/client/ActiveMQXAConnection.java | 4 +-
.../jms/client/ActiveMQXAConnectionFactory.java | 3 +-
.../artemis/jms/client/ActiveMQXASession.java | 8 -
.../jms/client/ConnectionFactoryOptions.java | 4 +-
.../jms/client/DefaultConnectionProperties.java | 3 +-
.../artemis/jms/client/JmsExceptionUtils.java | 6 -
.../artemis/jms/client/ThreadAwareContext.java | 34 +-
.../jndi/ActiveMQInitialContextFactory.java | 8 +-
.../artemis/jndi/JNDIReferenceFactory.java | 45 +-
.../apache/activemq/artemis/jndi/JNDIStorable.java | 27 +-
.../activemq/artemis/jndi/ReadOnlyContext.java | 38 +-
.../activemq/artemis/uri/JMSConnectionOptions.java | 5 +-
.../artemis/jms/bridge/QualityOfServiceMode.java | 64 +-
.../artemis/jms/bridge/impl/JMSBridgeImpl.java | 25 +-
.../jms/persistence/config/PersistedBindings.java | 20 -
.../config/PersistedConnectionFactory.java | 12 -
.../artemis/jms/server/JMSServerConfigParser.java | 4 -
.../artemis/jms/server/JMSServerManager.java | 76 +--
.../impl/ConnectionFactoryConfigurationImpl.java | 12 +-
.../server/config/impl/FileJMSConfiguration.java | 19 -
.../artemis/jms/server/embedded/EmbeddedJMS.java | 18 +-
.../jms/server/impl/JMSServerManagerImpl.java | 71 +-
.../artemis/core/io/AbstractSequentialFile.java | 11 +-
.../core/io/AbstractSequentialFileFactory.java | 6 +-
.../activemq/artemis/core/io/IOCallback.java | 10 +-
.../activemq/artemis/core/io/SequentialFile.java | 57 +-
.../artemis/core/io/SequentialFileFactory.java | 32 +-
.../artemis/core/io/aio/AIOSequentialFile.java | 9 +-
.../core/io/aio/AIOSequentialFileFactory.java | 9 +-
.../artemis/core/io/buffer/TimedBuffer.java | 10 +-
.../core/io/buffer/TimedBufferObserver.java | 3 +-
.../artemis/core/io/mapped/MappedFile.java | 12 +-
.../artemis/core/io/nio/NIOSequentialFile.java | 14 +-
.../core/io/nio/NIOSequentialFileFactory.java | 2 +-
.../artemis/core/io/util/ByteBufferPool.java | 15 +-
.../artemis/core/journal/EncoderPersister.java | 6 +-
.../activemq/artemis/core/journal/Journal.java | 94 ++-
.../core/journal/JournalLoadInformation.java | 16 -
.../activemq/artemis/core/journal/RecordInfo.java | 3 +-
.../core/journal/TransactionFailureCallback.java | 7 +-
.../core/journal/collections/JournalHashMap.java | 23 +-
.../journal/impl/AbstractJournalUpdateTask.java | 9 -
.../core/journal/impl/FileWrapperJournal.java | 12 +-
.../core/journal/impl/JournalCompactor.java | 23 +-
.../core/journal/impl/JournalConstants.java | 7 +-
.../artemis/core/journal/impl/JournalFile.java | 7 +-
.../core/journal/impl/JournalFilesRepository.java | 38 +-
.../artemis/core/journal/impl/JournalImpl.java | 165 ++---
.../core/journal/impl/JournalReaderCallback.java | 33 -
.../artemis/core/journal/impl/JournalRecord.java | 6 +-
.../core/journal/impl/JournalRecordProvider.java | 7 +-
.../core/journal/impl/JournalTransaction.java | 44 +-
.../core/journal/impl/ObjIntIntArrayList.java | 7 +-
.../artemis/core/journal/impl/Reclaimer.java | 22 +-
.../journal/impl/dataformat/JournalAddRecord.java | 10 -
.../impl/dataformat/JournalAddRecordTX.java | 5 -
.../impl/dataformat/JournalCompleteRecordTX.java | 13 +-
.../impl/dataformat/JournalDeleteRecord.java | 3 -
.../impl/dataformat/JournalDeleteRecordTX.java | 5 -
.../artemis/core/io/aio/FileIOUtilTest.java | 8 +-
.../artemis/junit/ActiveMQConsumerResource.java | 17 +-
.../junit/ActiveMQDynamicProducerResource.java | 17 +-
.../artemis/junit/ActiveMQProducerResource.java | 10 +-
.../artemis/junit/EmbeddedActiveMQResource.java | 21 +-
.../artemis/junit/EmbeddedJMSResource.java | 22 +-
.../artemis/junit/ActiveMQConsumerExtension.java | 12 +-
.../junit/ActiveMQDynamicProducerExtension.java | 13 +-
.../artemis/junit/ActiveMQProducerExtension.java | 13 +-
.../artemis/junit/EmbeddedActiveMQExtension.java | 4 +-
.../junit/AbstractActiveMQClientDelegate.java | 2 -
.../artemis/junit/ActiveMQConsumerOperations.java | 9 +-
.../junit/ActiveMQDynamicProducerOperations.java | 22 +-
.../artemis/junit/ActiveMQProducerOperations.java | 37 +-
.../artemis/junit/EmbeddedActiveMQDelegate.java | 5 +-
.../artemis/junit/EmbeddedActiveMQOperations.java | 134 ++--
.../artemis/junit/EmbeddedJMSDelegate.java | 22 +-
.../artemis/junit/EmbeddedJMSOperations.java | 50 +-
.../lockmanager/file/FileBasedLockManager.java | 5 +-
.../artemis/logs/annotation/GetLogger.java | 4 +-
.../artemis/logs/annotation/LogBundle.java | 9 +-
.../artemis/logs/annotation/LogMessage.java | 10 +-
.../processor/LogAnnotationProcessor.java | 4 +-
.../artemis/maven/ArtemisCreatePlugin.java | 4 +-
.../artemis/maven/ArtemisDependencyDocPlugin.java | 26 +-
.../artemis/maven/ArtemisDependencyScanPlugin.java | 4 +-
.../protocol/amqp/broker/AMQPLargeMessage.java | 21 +-
.../artemis/protocol/amqp/broker/AMQPMessage.java | 124 ++--
.../amqp/broker/AMQPMessageBrokerAccessor.java | 30 +-
.../protocol/amqp/broker/AMQPMessagePersister.java | 4 +-
.../amqp/broker/AMQPMessagePersisterV2.java | 4 +-
.../amqp/broker/AMQPMessagePersisterV3.java | 4 +-
.../protocol/amqp/broker/AMQPSessionCallback.java | 66 +-
.../protocol/amqp/broker/AMQPStandardMessage.java | 4 +-
.../broker/ActiveMQProtonRemotingConnection.java | 6 +-
.../artemis/protocol/amqp/broker/KMPNeedle.java | 11 +-
.../amqp/broker/ProtonProtocolManager.java | 34 +-
.../amqp/broker/ProtonProtocolManagerFactory.java | 11 +-
.../amqp/client/ProtonClientProtocolManager.java | 7 +-
.../amqp/connect/AMQPBrokerConnection.java | 63 +-
.../connect/AMQPBrokerConnectionConstants.java | 12 +-
.../amqp/connect/AMQPBrokerConnectionManager.java | 18 +-
.../amqp/connect/AMQPRemoteBrokerConnection.java | 59 +-
.../amqp/connect/federation/AMQPFederation.java | 210 +++---
.../federation/AMQPFederationAddressConsumer.java | 15 +-
.../AMQPFederationAddressPolicyManager.java | 64 +-
.../AMQPFederationAddressSenderController.java | 9 +-
.../federation/AMQPFederationAsyncCompletion.java | 15 +-
.../AMQPFederationCommandDispatcher.java | 35 +-
.../federation/AMQPFederationCommandProcessor.java | 13 +-
.../federation/AMQPFederationConfiguration.java | 108 +--
.../federation/AMQPFederationConstants.java | 192 +++---
.../connect/federation/AMQPFederationConsumer.java | 126 ++--
.../AMQPFederationConsumerConfiguration.java | 45 +-
.../federation/AMQPFederationConsumerControl.java | 52 +-
.../federation/AMQPFederationConsumerManager.java | 114 ++--
.../connect/federation/AMQPFederationControl.java | 6 +-
.../federation/AMQPFederationEventDispatcher.java | 56 +-
.../federation/AMQPFederationEventProcessor.java | 27 +-
.../federation/AMQPFederationEventSupport.java | 51 +-
.../AMQPFederationGenericConsumerInfo.java | 27 +-
.../AMQPFederationLocalPolicyControl.java | 6 +-
.../AMQPFederationLocalPolicyManager.java | 107 ++-
.../AMQPFederationManagementSupport.java | 188 ++----
.../connect/federation/AMQPFederationMetrics.java | 12 +-
.../federation/AMQPFederationPolicyManager.java | 67 +-
.../federation/AMQPFederationPolicySupport.java | 116 ++--
.../federation/AMQPFederationProducerControl.java | 56 +-
.../federation/AMQPFederationQueueConsumer.java | 21 +-
.../AMQPFederationQueuePolicyManager.java | 69 +-
.../AMQPFederationQueueSenderController.java | 8 +-
.../AMQPFederationRemoteAddressPolicyManager.java | 13 +-
.../AMQPFederationRemotePolicyControl.java | 11 +-
.../AMQPFederationRemotePolicyControlType.java | 8 +-
.../AMQPFederationRemotePolicyManager.java | 35 +-
.../AMQPFederationRemoteQueuePolicyManager.java | 13 +-
.../federation/AMQPFederationSenderController.java | 20 +-
.../connect/federation/AMQPFederationSource.java | 63 +-
.../AMQPFederationSourceControlType.java | 6 +-
.../connect/federation/AMQPFederationTarget.java | 8 +-
.../AMQPFederationTargetControlType.java | 6 +-
.../ActiveMQServerAMQPFederationPlugin.java | 73 +-
.../mirror/AMQPMirrorControllerAggregation.java | 4 +-
.../connect/mirror/AMQPMirrorControllerSource.java | 16 +-
.../connect/mirror/AMQPMirrorControllerTarget.java | 30 +-
.../connect/mirror/AMQPMirrorMessageFactory.java | 3 +-
.../protocol/amqp/connect/mirror/AckManager.java | 10 +-
.../amqp/connect/mirror/MirrorTransaction.java | 5 +-
.../amqp/connect/mirror/ReferenceIDSupplier.java | 9 +-
.../amqp/connect/mirror/ReferenceNodeStore.java | 4 +-
.../amqp/converter/AMQPContentTypeSupport.java | 8 +-
.../amqp/converter/AMQPMessageIdHelper.java | 88 +--
.../amqp/converter/AMQPMessageSupport.java | 77 +--
.../protocol/amqp/converter/AmqpCoreConverter.java | 5 +-
.../coreWrapper/CoreMapMessageWrapper.java | 4 +-
.../coreWrapper/CoreTextMessageWrapper.java | 6 +-
.../protocol/amqp/federation/Federation.java | 6 +-
.../amqp/federation/FederationConstants.java | 7 +-
.../amqp/federation/FederationConsumer.java | 4 +-
.../amqp/federation/FederationConsumerInfo.java | 53 +-
.../FederationReceiveFromAddressPolicy.java | 15 +-
.../FederationReceiveFromQueuePolicy.java | 4 +-
.../FederationReceiveFromResourcePolicy.java | 12 +-
.../logger/ActiveMQAMQPProtocolMessageBundle.java | 8 +-
.../amqp/proton/AMQPConnectionContext.java | 31 +-
.../protocol/amqp/proton/AMQPConstants.java | 6 +-
.../amqp/proton/AMQPLargeMessageReader.java | 3 +-
.../amqp/proton/AMQPLargeMessageWriter.java | 7 +-
.../protocol/amqp/proton/AMQPMessageWriter.java | 5 +-
.../protocol/amqp/proton/AMQPSessionContext.java | 4 -
.../proton/AMQPTunneledCoreLargeMessageReader.java | 21 +-
.../proton/AMQPTunneledCoreLargeMessageWriter.java | 10 +-
.../amqp/proton/AMQPTunneledCoreMessageReader.java | 7 +-
.../amqp/proton/AMQPTunneledCoreMessageWriter.java | 10 +-
.../amqp/proton/AMQPTunneledMessageConstants.java | 28 +-
.../artemis/protocol/amqp/proton/AmqpSupport.java | 151 ++---
.../amqp/proton/AmqpTransferTagGenerator.java | 24 +-
.../amqp/proton/DefaultSenderController.java | 10 +-
.../protocol/amqp/proton/MessageReader.java | 35 +-
.../protocol/amqp/proton/MessageWriter.java | 59 +-
.../amqp/proton/ProtonAbstractReceiver.java | 115 ++--
.../amqp/proton/ProtonDeliveryHandler.java | 7 +-
.../amqp/proton/ProtonServerSenderContext.java | 15 +-
.../protocol/amqp/proton/SenderController.java | 49 +-
.../protocol/amqp/proton/handler/EventHandler.java | 3 -
.../amqp/proton/handler/ProtonHandler.java | 22 +-
.../proton/transaction/ProtonTransactionImpl.java | 17 +-
.../ProtonTransactionRefsOperation.java | 8 +-
.../amqp/sasl/ExternalServerSASLFactory.java | 3 -
.../protocol/amqp/sasl/GSSAPIServerSASL.java | 4 +-
.../protocol/amqp/sasl/ServerSASLFactory.java | 15 +-
.../protocol/amqp/sasl/ServerSASLPlain.java | 3 -
.../protocol/amqp/sasl/scram/SCRAMClientSASL.java | 3 +-
.../amqp/sasl/scram/SCRAMServerSASLFactory.java | 4 +-
.../amqp/sasl/scram/ScramClientFunctionality.java | 55 +-
.../sasl/scram/ScramClientFunctionalityImpl.java | 16 +-
.../amqp/sasl/scram/ScramServerFunctionality.java | 52 +-
.../sasl/scram/ScramServerFunctionalityImpl.java | 14 +-
.../artemis/protocol/amqp/util/NettyReadable.java | 4 +-
.../artemis/protocol/amqp/util/NettyWritable.java | 4 +-
.../artemis/protocol/amqp/util/TLSEncode.java | 4 +-
.../protocol/amqp/broker/AMQPMessageTest.java | 4 +-
.../AMQPFederationPolicySupportTest.java | 3 +-
.../converter/message/AMQPMessageIdHelperTest.java | 290 ++++----
.../message/JMSMappingInboundTransformerTest.java | 91 ++-
.../artemis/protocol/amqp/sasl/SCRAMTest.java | 3 -
.../HornetQClientProtocolManagerFactory.java | 4 +-
.../artemis/core/protocol/mqtt/MQTTConnection.java | 5 -
.../core/protocol/mqtt/MQTTConnectionManager.java | 8 +-
.../core/protocol/mqtt/MQTTProtocolHandler.java | 7 +-
.../core/protocol/mqtt/MQTTProtocolManager.java | 8 +-
.../core/protocol/mqtt/MQTTPublishManager.java | 3 -
.../core/protocol/mqtt/MQTTSessionState.java | 23 +-
.../core/protocol/mqtt/MQTTStateManager.java | 41 +-
.../protocol/mqtt/MQTTSubscriptionManager.java | 8 +-
.../artemis/core/protocol/mqtt/MQTTUtil.java | 28 +-
.../artemis/core/protocol/mqtt/MQTTUtilTest.java | 29 +-
.../artemis/core/protocol/mqtt/StateSerDeTest.java | 29 +-
.../core/protocol/openwire/OpenWireConnection.java | 17 +-
.../protocol/openwire/OpenWireFrameParser.java | 3 +-
.../protocol/openwire/OpenWireProtocolManager.java | 26 +-
.../openwire/amq/AMQConnectionContext.java | 21 -
.../core/protocol/openwire/amq/AMQConsumer.java | 13 +-
.../openwire/amq/AMQProducerBrokerExchange.java | 12 -
.../core/protocol/openwire/amq/AMQSession.java | 10 +-
.../core/protocol/stomp/StompConnection.java | 7 +-
.../artemis/core/protocol/stomp/StompDecoder.java | 8 -
.../core/protocol/stomp/StompFrameInterceptor.java | 2 +-
.../core/protocol/stomp/StompProtocolManager.java | 3 -
.../protocol/stomp/VersionedStompFrameHandler.java | 7 +-
.../protocol/stomp/v11/StompFrameHandlerV11.java | 5 +-
.../protocol/stomp/v12/StompFrameHandlerV12.java | 3 +-
.../ConnectionFactoryObjectFactory.java | 2 +-
.../referenceable/SerializableObjectRefAddr.java | 2 +-
.../artemis/ra/ActiveMQRABytesMessage.java | 141 +---
.../ra/ActiveMQRAConnectionFactoryImpl.java | 125 ++--
.../artemis/ra/ActiveMQRAConnectionManager.java | 8 -
.../artemis/ra/ActiveMQRAConnectionMetaData.java | 39 +-
.../ra/ActiveMQRAConnectionRequestInfo.java | 89 +--
.../activemq/artemis/ra/ActiveMQRACredential.java | 59 +-
.../artemis/ra/ActiveMQRALocalTransaction.java | 23 -
.../activemq/artemis/ra/ActiveMQRALogger.java | 4 +-
.../artemis/ra/ActiveMQRAMCFProperties.java | 51 +-
.../artemis/ra/ActiveMQRAManagedConnection.java | 153 +----
.../ra/ActiveMQRAManagedConnectionFactory.java | 126 +---
.../activemq/artemis/ra/ActiveMQRAMapMessage.java | 159 +----
.../activemq/artemis/ra/ActiveMQRAMessage.java | 283 ++------
.../artemis/ra/ActiveMQRAMessageConsumer.java | 76 +--
.../artemis/ra/ActiveMQRAMessageListener.java | 20 +-
.../artemis/ra/ActiveMQRAMessageProducer.java | 127 +---
.../activemq/artemis/ra/ActiveMQRAMetaData.java | 33 +-
.../artemis/ra/ActiveMQRAObjectMessage.java | 20 +-
.../activemq/artemis/ra/ActiveMQRAProperties.java | 55 +-
.../artemis/ra/ActiveMQRAQueueReceiver.java | 13 +-
.../activemq/artemis/ra/ActiveMQRAQueueSender.java | 28 +-
.../activemq/artemis/ra/ActiveMQRAService.java | 8 +-
.../activemq/artemis/ra/ActiveMQRASession.java | 316 ++-------
.../artemis/ra/ActiveMQRASessionFactory.java | 18 +-
.../artemis/ra/ActiveMQRASessionFactoryImpl.java | 217 +-----
.../artemis/ra/ActiveMQRAStreamMessage.java | 130 +---
.../activemq/artemis/ra/ActiveMQRATextMessage.java | 18 +-
.../artemis/ra/ActiveMQRATopicPublisher.java | 41 +-
.../artemis/ra/ActiveMQRATopicSubscriber.java | 18 +-
.../activemq/artemis/ra/ActiveMQRAXAResource.java | 22 +-
.../activemq/artemis/ra/ActiveMQRaUtils.java | 34 +-
.../artemis/ra/ActiveMQResourceAdapter.java | 481 +------------
.../artemis/ra/ConnectionFactoryProperties.java | 7 +-
.../artemis/ra/inflow/ActiveMQActivation.java | 66 +-
.../artemis/ra/inflow/ActiveMQActivationSpec.java | 248 +------
.../artemis/ra/inflow/ActiveMQMessageHandler.java | 9 -
.../ActiveMQRAConnectionFactoryObjectFactory.java | 2 +-
.../referenceable/SerializableObjectRefAddr.java | 4 +-
artemis-selector/pom.xml | 18 +
.../selector/filter/ArithmeticExpression.java | 11 -
.../artemis/selector/filter/BinaryExpression.java | 22 +-
.../artemis/selector/filter/BooleanExpression.java | 9 +-
.../selector/filter/ComparisonExpression.java | 20 +-
.../selector/filter/ConstantExpression.java | 17 +-
.../artemis/selector/filter/Expression.java | 4 +-
.../artemis/selector/filter/Filterable.java | 18 +-
.../artemis/selector/filter/LogicExpression.java | 6 +-
.../selector/filter/PropertyExpression.java | 11 -
.../artemis/selector/filter/UnaryExpression.java | 16 +-
.../artemis/selector/filter/XPathExpression.java | 4 +-
.../artemis/selector/filter/XQueryExpression.java | 4 +-
.../activemq/artemis/selector/impl/LRUCache.java | 28 +-
.../activemq/artemis/selector/SelectorTest.java | 3 -
.../selector/UnknownHandlingSelectorTest.java | 6 +-
.../activemq/artemis/osgi/ProtocolTracker.java | 7 +-
.../artemis/core/config/BridgeConfiguration.java | 82 +--
.../config/ClusterConnectionConfiguration.java | 61 --
.../artemis/core/config/Configuration.java | 570 ++++++++--------
.../core/config/CoreQueueConfiguration.java | 33 -
.../artemis/core/config/DivertConfiguration.java | 26 +-
.../artemis/core/config/FileDeploymentManager.java | 18 +-
.../artemis/core/config/WildcardConfiguration.java | 14 +-
.../AMQPFederatedBrokerConnectionElement.java | 52 +-
.../AMQPFederationBrokerPlugin.java | 5 +-
.../AMQPMirrorBrokerConnectionElement.java | 26 +-
.../BrokerConnectConfiguration.java | 7 +-
.../core/config/ha/ReplicaPolicyConfiguration.java | 4 +-
.../ha/ReplicationBackupPolicyConfiguration.java | 4 +-
.../core/config/impl/ConfigurationImpl.java | 6 -
.../core/config/impl/FileConfiguration.java | 5 +-
.../core/config/impl/LegacyJMSConfiguration.java | 6 -
.../core/config/impl/SecurityConfiguration.java | 12 +-
.../storage/DatabaseStorageConfiguration.java | 16 +-
.../artemis/core/deployers/Deployable.java | 35 +-
.../deployers/impl/FileConfigurationParser.java | 65 +-
.../activemq/artemis/core/filter/Filter.java | 9 +-
.../activemq/artemis/core/filter/FilterUtils.java | 4 +-
.../artemis/core/filter/impl/FilterImpl.java | 30 +-
.../management/impl/ActiveMQServerControlImpl.java | 5 -
.../core/management/impl/QueueControlImpl.java | 26 +-
.../management/impl/view/ActiveMQAbstractView.java | 3 -
.../core/management/impl/view/ConsumerField.java | 5 +-
.../core/management/impl/view/ProducerField.java | 5 +-
.../core/messagecounter/MessageCounter.java | 49 +-
.../impl/MessageCounterManagerImpl.java | 3 -
.../artemis/core/paging/PageTransactionInfo.java | 14 +-
.../activemq/artemis/core/paging/PagedMessage.java | 20 +-
.../artemis/core/paging/PagingManager.java | 23 +-
.../activemq/artemis/core/paging/PagingStore.java | 64 +-
.../core/paging/cursor/NonExistentPage.java | 6 +-
.../core/paging/cursor/PageCursorProvider.java | 4 -
.../core/paging/cursor/PageSubscription.java | 28 +-
.../core/paging/cursor/PagedReferenceImpl.java | 11 +-
.../cursor/impl/PageCounterRebuildManager.java | 13 +-
.../paging/cursor/impl/PageCursorProviderImpl.java | 53 +-
.../core/paging/cursor/impl/PagePositionImpl.java | 30 +-
.../cursor/impl/PageSubscriptionCounterImpl.java | 28 +-
.../paging/cursor/impl/PageSubscriptionImpl.java | 49 +-
.../activemq/artemis/core/paging/impl/Page.java | 18 +-
.../artemis/core/paging/impl/PageCache.java | 3 +-
.../artemis/core/paging/impl/PageTimedWriter.java | 9 +-
.../core/paging/impl/PageTransactionInfoImpl.java | 21 +-
.../artemis/core/paging/impl/PagedMessageImpl.java | 4 +-
.../core/paging/impl/PagingManagerImpl.java | 11 +-
.../artemis/core/paging/impl/PagingStoreImpl.java | 53 +-
.../artemis/core/persistence/OperationContext.java | 15 +-
.../artemis/core/persistence/StorageManager.java | 92 +--
.../config/PersistedAddressSetting.java | 10 +-
.../config/PersistedAddressSettingJSON.java | 4 -
.../core/persistence/config/PersistedRole.java | 3 -
.../config/PersistedSecuritySetting.java | 59 --
.../core/persistence/config/PersistedUser.java | 3 -
.../journal/AbstractJournalStorageManager.java | 55 +-
.../impl/journal/BatchingIDGenerator.java | 4 +-
.../persistence/impl/journal/BufferSplitter.java | 4 +-
.../persistence/impl/journal/DescribeJournal.java | 5 -
.../persistence/impl/journal/JournalRecordIds.java | 5 +-
.../impl/journal/JournalStorageManager.java | 25 +-
.../core/persistence/impl/journal/LargeBody.java | 13 +-
.../impl/journal/LargeServerMessageImpl.java | 8 +-
.../impl/journal/LargeServerMessageInSync.java | 6 -
.../impl/journal/OperationContextImpl.java | 26 +-
.../impl/journal/codec/DeleteEncoding.java | 9 -
.../journal/codec/FinishPageMessageOperation.java | 3 +-
.../impl/journal/codec/LargeMessagePersister.java | 10 -
.../journal/codec/PendingLargeMessageEncoding.java | 10 -
.../activemq/artemis/core/postoffice/Address.java | 2 +-
.../artemis/core/postoffice/AddressManager.java | 16 +-
.../activemq/artemis/core/postoffice/Binding.java | 6 +-
.../activemq/artemis/core/postoffice/Bindings.java | 4 -
.../artemis/core/postoffice/DuplicateIDCache.java | 5 +-
.../artemis/core/postoffice/PostOffice.java | 33 +-
.../artemis/core/postoffice/QueueInfo.java | 3 -
.../artemis/core/postoffice/impl/AddressImpl.java | 2 +-
.../artemis/core/postoffice/impl/AddressMap.java | 6 +-
.../artemis/core/postoffice/impl/BindingsImpl.java | 16 +-
.../core/postoffice/impl/CopyOnWriteBindings.java | 26 +-
.../postoffice/impl/InMemoryDuplicateIDCache.java | 11 +-
.../impl/PersistentDuplicateIDCache.java | 11 +-
.../core/postoffice/impl/PostOfficeImpl.java | 24 +-
.../core/postoffice/impl/SimpleAddressManager.java | 3 -
.../postoffice/impl/WildcardAddressManager.java | 6 +-
.../artemis/core/protocol/ProtocolHandler.java | 3 +-
.../protocol/core/ServerSessionPacketHandler.java | 3 +-
.../protocol/core/impl/ActiveMQPacketHandler.java | 3 +-
.../core/impl/CoreProtocolManagerFactory.java | 7 +-
.../impl/wireformat/BackupRegistrationMessage.java | 8 +-
.../core/impl/wireformat/NodeAnnounceMessage.java | 3 -
.../impl/wireformat/ReplicationAddMessage.java | 12 -
.../impl/wireformat/ReplicationAddTXMessage.java | 9 -
.../impl/wireformat/ReplicationCommitMessage.java | 3 -
.../impl/wireformat/ReplicationDeleteMessage.java | 6 -
.../wireformat/ReplicationDeleteTXMessage.java | 9 -
.../ReplicationLargeMessageBeginMessage.java | 3 -
.../ReplicationLargeMessageEndMessage.java | 9 +-
.../ReplicationLargeMessageWriteMessage.java | 10 -
.../wireformat/ReplicationPageEventMessage.java | 9 -
.../wireformat/ReplicationPageWriteMessage.java | 6 -
.../impl/wireformat/ReplicationPrepareMessage.java | 6 -
.../ReplicationPrimaryIsStoppingMessage.java | 16 +-
.../wireformat/ReplicationStartSyncMessage.java | 8 +-
.../wireformat/ReplicationSyncFileMessage.java | 11 +-
.../core/remoting/impl/invm/InVMAcceptor.java | 2 +-
.../remoting/impl/netty/HttpAcceptorHandler.java | 3 +-
.../core/remoting/impl/netty/NettyAcceptor.java | 16 +-
.../core/remoting/server/RemotingService.java | 34 +-
.../remoting/server/impl/RemotingServiceImpl.java | 10 +-
.../core/replication/ReplicatedJournal.java | 157 +----
.../core/replication/ReplicatedLargeMessage.java | 3 +-
.../core/replication/ReplicationEndpoint.java | 73 +-
.../core/replication/ReplicationManager.java | 45 +-
.../core/security/impl/SecurityStoreImpl.java | 21 +-
.../artemis/core/server/ActivateCallback.java | 17 +-
.../core/server/ActivationFailureListener.java | 4 +-
.../artemis/core/server/ActiveMQMessageBundle.java | 20 +-
.../artemis/core/server/ActiveMQServer.java | 206 +++---
.../artemis/core/server/ActiveMQServers.java | 4 +-
.../artemis/core/server/BrokerConnection.java | 12 +-
.../activemq/artemis/core/server/Consumer.java | 39 +-
.../activemq/artemis/core/server/ConsumerInfo.java | 55 +-
.../core/server/CoreLargeServerMessage.java | 3 +-
.../activemq/artemis/core/server/HandleStatus.java | 6 +-
.../artemis/core/server/LargeServerMessage.java | 2 -
.../artemis/core/server/MemoryManager.java | 3 +-
.../artemis/core/server/MessageReference.java | 38 +-
.../activemq/artemis/core/server/NodeLocator.java | 6 +-
.../activemq/artemis/core/server/NodeManager.java | 5 -
.../apache/activemq/artemis/core/server/Queue.java | 105 ++-
.../activemq/artemis/core/server/QueueConfig.java | 21 +-
.../activemq/artemis/core/server/QueueFactory.java | 6 +-
.../core/server/RemoteBrokerConnection.java | 15 +-
.../artemis/core/server/RoutingContext.java | 4 +-
.../artemis/core/server/SecuritySettingPlugin.java | 16 +-
.../artemis/core/server/ServerConsumer.java | 29 +-
.../artemis/core/server/ServerMessage.java | 6 +-
.../artemis/core/server/ServerSession.java | 31 +-
.../artemis/core/server/ServiceRegistry.java | 30 +-
.../artemis/core/server/cluster/BackupManager.java | 93 ++-
.../artemis/core/server/cluster/Bridge.java | 4 +-
.../core/server/cluster/ClusterConnection.java | 13 +-
.../core/server/cluster/ClusterControl.java | 27 +-
.../core/server/cluster/ClusterController.java | 39 +-
.../core/server/cluster/ClusterManager.java | 21 +-
.../core/server/cluster/ha/ColocatedHAManager.java | 44 +-
.../artemis/core/server/cluster/ha/HAManager.java | 6 +-
.../artemis/core/server/cluster/ha/HAPolicy.java | 15 +-
.../core/server/cluster/ha/ReplicaPolicy.java | 11 +-
.../core/server/cluster/ha/ReplicatedPolicy.java | 21 +-
.../cluster/ha/ReplicationPrimaryPolicy.java | 3 +-
.../server/cluster/ha/StandaloneHAManager.java | 6 +-
.../core/server/cluster/impl/BridgeImpl.java | 24 +-
.../core/server/cluster/impl/BridgeMetrics.java | 8 +-
.../server/cluster/impl/BroadcastGroupImpl.java | 12 +-
.../cluster/impl/ClusterConnectionBridge.java | 8 +-
.../server/cluster/impl/ClusterConnectionImpl.java | 75 +--
.../cluster/impl/ClusterConnectionMetrics.java | 12 +-
.../core/server/cluster/impl/Redistributor.java | 3 -
.../cluster/impl/RemoteQueueBindingImpl.java | 6 +-
.../artemis/core/server/cluster/quorum/Quorum.java | 4 +-
.../core/server/cluster/quorum/QuorumManager.java | 38 +-
.../core/server/cluster/quorum/QuorumVote.java | 21 +-
.../server/cluster/quorum/QuorumVoteHandler.java | 9 -
.../cluster/quorum/QuorumVoteServerConnect.java | 11 +-
.../cluster/quorum/SharedNothingBackupQuorum.java | 18 +-
.../artemis/core/server/cluster/quorum/Vote.java | 14 +-
.../core/server/embedded/EmbeddedActiveMQ.java | 14 +-
.../artemis/core/server/federation/Federation.java | 8 +-
.../core/server/federation/FederationManager.java | 8 +-
.../federation/address/FederatedAddress.java | 10 +-
.../server/federation/queue/FederatedQueue.java | 10 +-
.../artemis/core/server/files/FileMoveManager.java | 5 +-
.../core/server/files/FileStoreMonitor.java | 10 +-
.../artemis/core/server/group/GroupingHandler.java | 4 +-
.../core/server/group/impl/GroupBinding.java | 3 -
.../server/group/impl/LocalGroupingHandler.java | 5 +-
.../server/group/impl/RemoteGroupingHandler.java | 4 +-
.../server/impl/AbstractProtocolReference.java | 7 +-
.../artemis/core/server/impl/Activation.java | 54 +-
.../core/server/impl/ActiveMQServerImpl.java | 58 +-
.../artemis/core/server/impl/AddressInfo.java | 10 -
.../server/impl/AnyNodeLocatorForReplication.java | 7 +-
.../server/impl/BackupRecoveryJournalLoader.java | 9 +-
.../core/server/impl/BucketMessageGroups.java | 19 +-
.../core/server/impl/CleaningActivateCallback.java | 4 +-
.../core/server/impl/ConnectorsService.java | 8 +-
.../core/server/impl/DisabledMessageGroups.java | 3 +-
.../artemis/core/server/impl/DivertImpl.java | 3 -
.../core/server/impl/FileBasedNodeManager.java | 11 +-
.../core/server/impl/FileLockNodeManager.java | 4 -
.../server/impl/GroupFirstMessageReference.java | 7 +-
.../artemis/core/server/impl/InVMNodeManager.java | 6 +-
.../artemis/core/server/impl/LastValueQueue.java | 8 +-
.../artemis/core/server/impl/MapMessageGroups.java | 3 +-
.../core/server/impl/MessageReferenceImpl.java | 11 +-
.../core/server/impl/PostOfficeJournalLoader.java | 9 -
.../core/server/impl/QueueConfigurationUtils.java | 20 +-
.../core/server/impl/QueueConsumersImpl.java | 22 +-
.../artemis/core/server/impl/QueueFactoryImpl.java | 3 -
.../artemis/core/server/impl/QueueImpl.java | 132 ++--
.../core/server/impl/QueueMessageMetrics.java | 14 +-
.../artemis/core/server/impl/RefsOperation.java | 3 +-
.../server/impl/ReplicationBackupActivation.java | 10 +-
.../artemis/core/server/impl/ReplicationError.java | 7 +-
.../core/server/impl/ReplicationObserver.java | 3 +-
.../server/impl/ReplicationPrimaryActivation.java | 8 +-
.../core/server/impl/RoutingContextImpl.java | 2 +-
.../artemis/core/server/impl/ScaleDownHandler.java | 13 +-
.../core/server/impl/ServerConsumerImpl.java | 40 +-
.../core/server/impl/ServerSessionImpl.java | 43 +-
.../core/server/impl/ServiceRegistryImpl.java | 3 +-
.../server/impl/SharedNothingBackupActivation.java | 30 +-
.../impl/SharedNothingPrimaryActivation.java | 15 +-
.../core/server/impl/SimpleMessageGroups.java | 5 +-
.../impl/jdbc/ActiveMQScheduledLeaseLock.java | 3 +-
.../core/server/impl/jdbc/JdbcLeaseLock.java | 8 +-
.../artemis/core/server/impl/jdbc/LeaseLock.java | 19 +-
.../core/server/impl/jdbc/ScheduledLeaseLock.java | 3 +-
.../core/server/impl/jdbc/SharedStateManager.java | 3 +-
.../quorum/ActivationSequenceStateMachine.java | 38 +-
.../server/management/ArtemisMBeanServerGuard.java | 14 +-
.../management/ArtemisRbacInvocationHandler.java | 33 +-
.../server/management/ConnectorServerFactory.java | 2 -
.../core/server/management/JaasAuthenticator.java | 4 +-
.../core/server/management/RmiRegistryFactory.java | 9 -
.../management/impl/HawtioSecurityControlImpl.java | 11 +-
.../management/impl/ManagementServiceImpl.java | 14 +-
.../metrics/NettyPooledAllocatorMetrics.java | 4 +-
.../core/server/mirror/MirrorController.java | 2 +-
.../server/plugin/ActiveMQServerAddressPlugin.java | 9 -
.../server/plugin/ActiveMQServerBasePlugin.java | 5 -
.../server/plugin/ActiveMQServerBindingPlugin.java | 17 -
.../server/plugin/ActiveMQServerBridgePlugin.java | 21 +-
.../plugin/ActiveMQServerConnectionPlugin.java | 9 -
.../plugin/ActiveMQServerConsumerPlugin.java | 26 -
.../plugin/ActiveMQServerCriticalPlugin.java | 5 -
.../plugin/ActiveMQServerFederationPlugin.java | 34 +-
.../server/plugin/ActiveMQServerMessagePlugin.java | 107 +--
.../core/server/plugin/ActiveMQServerPlugin.java | 3 -
.../server/plugin/ActiveMQServerQueuePlugin.java | 33 -
.../plugin/ActiveMQServerResourcePlugin.java | 21 -
.../server/plugin/ActiveMQServerSessionPlugin.java | 42 --
.../plugin/impl/LoggingActiveMQServerPlugin.java | 131 +---
.../impl/NotificationActiveMQServerPlugin.java | 29 -
.../protocol/websocket/WebSocketFrameEncoder.java | 7 +-
.../websocket/WebSocketFrameEncoderType.java | 29 +-
.../core/server/transformer/ServerMessageImpl.java | 6 +-
.../core/settings/HierarchicalRepository.java | 16 +-
.../core/settings/impl/AddressSettings.java | 36 -
.../impl/HierarchicalObjectRepository.java | 50 +-
.../activemq/artemis/core/settings/impl/Match.java | 8 +-
.../core/settings/impl/ResourceLimitSettings.java | 6 -
.../artemis/core/transaction/Transaction.java | 24 +-
.../transaction/TransactionOperationAbstract.java | 3 -
.../transaction/impl/BindingsTransactionImpl.java | 3 -
.../core/transaction/impl/TransactionImpl.java | 3 -
.../protocol/AbstractProtocolManagerFactory.java | 9 +-
.../spi/core/protocol/MessagePersister.java | 8 +-
.../artemis/spi/core/protocol/ProtocolManager.java | 15 +-
.../spi/core/protocol/ProtocolManagerFactory.java | 32 +-
.../artemis/spi/core/protocol/SessionCallback.java | 21 +-
.../artemis/spi/core/remoting/Acceptor.java | 16 +-
.../artemis/spi/core/remoting/AcceptorFactory.java | 4 +-
.../core/security/ActiveMQJAASSecurityManager.java | 6 +-
.../spi/core/security/ActiveMQSecurityManager.java | 11 +-
.../core/security/ActiveMQSecurityManager2.java | 23 +-
.../core/security/ActiveMQSecurityManager3.java | 30 +-
.../core/security/ActiveMQSecurityManager4.java | 34 +-
.../core/security/ActiveMQSecurityManager5.java | 29 +-
.../core/security/ActiveMQSecurityManagerImpl.java | 2 -
.../spi/core/security/jaas/AuditLoginModule.java | 12 +-
.../core/security/jaas/CertificateCallback.java | 12 +-
.../core/security/jaas/CertificateLoginModule.java | 22 +-
.../spi/core/security/jaas/ClientIDCallback.java | 11 -
.../spi/core/security/jaas/DigestCallback.java | 3 +-
.../spi/core/security/jaas/GuestLoginModule.java | 5 +-
.../spi/core/security/jaas/HmacCallback.java | 8 -
.../jaas/PrincipalConversionLoginModule.java | 4 +-
.../spi/core/security/jaas/PrincipalsCallback.java | 4 +-
.../core/security/jaas/ReloadableProperties.java | 2 +-
.../core/security/jaas/SCRAMMechanismCallback.java | 1 +
.../security/jaas/SCRAMPropertiesLoginModule.java | 16 +-
.../jaas/TextFileCertificateLoginModule.java | 30 +-
.../spi/core/security/scram/ScramException.java | 3 +
.../spi/core/security/scram/ScramUtils.java | 97 +--
.../spi/core/security/scram/StringPrep.java | 109 +--
.../artemis/spi/core/security/scram/UserData.java | 19 -
.../core/config/impl/ConfigurationImplTest.java | 1 -
.../config/impl/ConfigurationValidationTest.java | 4 +-
.../config/impl/FileConfigurationParserTest.java | 6 +-
.../impl/WrongRoleFileConfigurationParserTest.java | 7 +-
.../artemis/core/filter/impl/FilterTest.java | 1 -
.../impl/netty/HttpAcceptorHandlerTest.java | 3 -
.../core/security/jaas/NoCacheLoginModule.java | 29 +-
.../cluster/impl/BroadcastGroupImplTest.java | 18 +-
.../artemis/core/server/embedded/MainTest.java | 6 +-
.../server/group/impl/ClusteredResetMockTest.java | 5 +-
.../websocket/WebSocketFrameEncoderTest.java | 3 -
.../websocket/WebSocketServerHandlerTest.java | 3 -
.../artemis/core/settings/RepositoryTest.java | 5 +-
.../artemis/tests/util/ServerTestBase.java | 44 +-
.../artemis/service/extensions/ServiceUtils.java | 7 +-
.../xa/ActiveMQXAResourceWrapperImpl.java | 7 +-
.../xa/recovery/ActiveMQXAResourceRecovery.java | 12 +-
.../xa/recovery/ActiveMQXAResourceWrapper.java | 20 +-
.../extensions/xa/recovery/XARecoveryConfig.java | 3 -
.../artemis/logs/AssertionLoggerHandler.java | 16 +-
.../tests/extensions/SubjectDotDoAsExtension.java | 33 +-
.../extensions/TestMethodNameMatchExtension.java | 8 +-
.../tests/extensions/ThreadLeakCheckDelegate.java | 3 -
.../parameterized/ParameterizedTestExtension.java | 8 +-
.../artemis/tests/util/ArtemisTestCase.java | 10 +-
.../activemq/artemis/utils/SilentTestCase.java | 3 +-
.../artemis/component/AuthenticationFilter.java | 6 +-
.../activemq/artemis/component/JolokiaFilter.java | 18 +-
.../artemis/component/WebServerComponent.java | 2 +-
.../apache/activemq/cli/test/WebServerCLITest.java | 4 +-
docs/hacking-guide/_formatting.adoc | 4 +
etc/checkstyle.xml | 11 +
pom.xml | 2 +-
.../org/apache/activemq/broker/BrokerService.java | 5 +-
.../apache/activemq/broker/SslBrokerService.java | 10 +-
.../broker/artemiswrapper/InVMNameParser.java | 7 -
.../artemiswrapper/NonSerializableFactory.java | 4 -
.../org/apache/activemq/usage/SystemUsage.java | 21 +-
.../apache/activemq/ActiveMQMessageAuditTest.java | 13 +-
.../org/apache/activemq/AutoFailTestSupport.java | 30 +-
.../apache/activemq/CombinationTestSupport.java | 29 +-
.../org/apache/activemq/ConnectionCleanupTest.java | 9 -
...ConnectionCloseMultipleTimesConcurrentTest.java | 9 -
.../activemq/ConnectionCloseMultipleTimesTest.java | 9 -
.../activemq/ConsumerReceiveWithTimeoutTest.java | 13 +-
...eConsumerButDontStartConnectionWarningTest.java | 3 -
.../apache/activemq/EmbeddedBrokerTestSupport.java | 12 +-
.../java/org/apache/activemq/ExpiryHogTest.java | 3 -
.../activemq/JMSDurableTopicRedeliverTest.java | 5 -
.../org/apache/activemq/JMSIndividualAckTest.java | 12 -
.../org/apache/activemq/JMSQueueRedeliverTest.java | 3 -
.../apache/activemq/JmsAutoAckListenerTest.java | 8 -
.../java/org/apache/activemq/JmsAutoAckTest.java | 8 -
.../java/org/apache/activemq/JmsBenchmark.java | 10 +-
.../apache/activemq/JmsClientAckListenerTest.java | 10 -
.../java/org/apache/activemq/JmsClientAckTest.java | 12 -
.../activemq/JmsConnectionStartStopTest.java | 13 -
.../JmsConsumerResetActiveListenerTest.java | 4 -
.../activemq/JmsCreateConsumerInOnMessageTest.java | 13 -
.../JmsDurableQueueWildcardSendReceiveTest.java | 12 +-
.../activemq/JmsDurableTopicSelectorTest.java | 3 -
.../activemq/JmsDurableTopicSendReceiveTest.java | 10 -
.../activemq/JmsDurableTopicTransactionTest.java | 3 -
.../JmsDurableTopicWildcardSendReceiveTest.java | 14 +-
.../activemq/JmsMultipleClientsTestSupport.java | 4 +-
.../org/apache/activemq/JmsQueueBrowserTest.java | 2 -
.../activemq/JmsQueueCompositeSendReceiveTest.java | 22 -
.../apache/activemq/JmsQueueRequestReplyTest.java | 5 -
.../org/apache/activemq/JmsQueueSelectorTest.java | 3 -
.../apache/activemq/JmsQueueSendReceiveTest.java | 5 -
...ReceiveTwoConnectionsStartBeforeBrokerTest.java | 3 -
.../JmsQueueSendReceiveTwoConnectionsTest.java | 5 -
.../JmsQueueSendReceiveUsingTwoSessionsTest.java | 5 -
.../JmsQueueTopicCompositeSendReceiveTest.java | 22 -
.../apache/activemq/JmsQueueTransactionTest.java | 20 +-
.../activemq/JmsQueueWildcardSendReceiveTest.java | 14 -
.../org/apache/activemq/JmsRedeliveredTest.java | 84 +--
.../apache/activemq/JmsSendReceiveTestSupport.java | 31 +-
.../JmsSendReceiveWithMessageExpirationTest.java | 11 -
.../activemq/JmsSendWithAsyncCallbackTest.java | 3 -
.../org/apache/activemq/JmsSessionRecoverTest.java | 38 --
.../apache/activemq/JmsTempDestinationTest.java | 35 +-
.../activemq/JmsTopicCompositeSendReceiveTest.java | 20 -
.../org/apache/activemq/JmsTopicRedeliverTest.java | 21 -
.../apache/activemq/JmsTopicRequestReplyTest.java | 7 +-
.../org/apache/activemq/JmsTopicSelectorTest.java | 3 -
.../JmsTopicSendReceiveSubscriberTest.java | 3 -
.../apache/activemq/JmsTopicSendReceiveTest.java | 7 +-
.../JmsTopicSendReceiveWithTwoConnectionsTest.java | 3 -
...icSendReceiveWithTwoConnectionsWithJMXTest.java | 4 -
.../activemq/JmsTopicSendSameMessageTest.java | 3 -
.../apache/activemq/JmsTopicTransactionTest.java | 3 -
.../activemq/JmsTopicWildcardSendReceiveTest.java | 3 -
.../apache/activemq/JmsTransactionTestSupport.java | 74 +-
.../apache/activemq/LargeMessageTestSupport.java | 3 -
.../activemq/MessageListenerRedeliveryTest.java | 3 -
.../apache/activemq/MessageTransformationTest.java | 5 +-
.../org/apache/activemq/RedeliveryPolicyTest.java | 18 -
.../test/java/org/apache/activemq/TestSupport.java | 7 +-
.../apache/activemq/ZeroPrefetchConsumerTest.java | 3 -
.../activemq/blob/BlobTransferPolicyUriTest.java | 3 -
.../apache/activemq/broker/BrokerBenchmark.java | 14 +-
.../activemq/broker/BrokerRestartTestSupport.java | 11 +-
.../org/apache/activemq/broker/BrokerTest.java | 4 +-
.../apache/activemq/broker/BrokerTestSupport.java | 8 +-
.../activemq/command/ActiveMQBytesMessageTest.java | 14 +-
.../activemq/command/ActiveMQMapMessageTest.java | 14 -
.../activemq/command/ActiveMQMessageTest.java | 15 +-
.../command/ActiveMQObjectMessageTest.java | 14 -
.../command/ActiveMQStreamMessageTest.java | 14 -
.../activemq/command/ActiveMQTextMessageTest.java | 3 -
.../apache/activemq/demo/DefaultQueueSender.java | 12 +-
.../org/apache/activemq/demo/SimpleConsumer.java | 36 +-
.../org/apache/activemq/demo/SimpleProducer.java | 41 +-
.../apache/activemq/demo/SimpleQueueReceiver.java | 32 +-
.../apache/activemq/demo/SimpleQueueSender.java | 37 +-
.../activemq/network/NetworkTestSupport.java | 19 +-
.../activemq/openwire/BooleanStreamTest.java | 3 -
.../activemq/openwire/DataFileGenerator.java | 7 -
.../openwire/NumberRangesWhileMarshallingTest.java | 3 -
.../apache/activemq/test/JmsResourceProvider.java | 86 +--
.../activemq/test/JmsSendReceiveTestSupport.java | 17 +-
.../activemq/test/JmsTopicSendReceiveTest.java | 9 +-
.../JmsTopicSendReceiveWithTwoConnectionsTest.java | 25 -
.../java/org/apache/activemq/test/TestSupport.java | 70 +-
.../activemq/transport/QueueClusterTest.java | 3 -
.../activemq/transport/StubCompositeTransport.java | 3 -
.../apache/activemq/transport/StubTransport.java | 4 -
.../activemq/transport/StubTransportListener.java | 4 -
.../activemq/transport/TopicClusterTest.java | 3 -
.../failover/FailoverComplexClusterTest.java | 56 +-
.../multicast/MulticastTransportTest.java | 4 -
.../transport/nio/NIOJmsSendAndReceiveTest.java | 3 -
.../activemq/transport/peer/PeerTransportTest.java | 6 -
.../transport/reliable/DropCommandStrategy.java | 7 +-
.../transport/reliable/ReliableTransportTest.java | 3 -
.../reliable/UnreliableCommandDatagramChannel.java | 3 -
.../reliable/UnreliableCommandDatagramSocket.java | 3 -
.../transport/reliable/UnreliableUdpTransport.java | 4 +-
.../reliable/UnreliableUdpTransportTest.java | 4 -
.../transport/tcp/InactivityMonitorTest.java | 15 +-
.../transport/tcp/QualityOfServiceUtilsTest.java | 5 +-
.../transport/tcp/ServerSocketTstFactory.java | 2 -
.../transport/tcp/SslContextBrokerServiceTest.java | 3 -
.../activemq/transport/tcp/TcpFaultyTransport.java | 5 -
.../transport/tcp/TcpFaultyTransportServer.java | 5 -
.../transport/tcp/TcpTransportBindTest.java | 2 -
.../transport/tcp/TcpTransportServerTest.java | 3 -
.../activemq/transport/tcp/TransportUriTest.java | 3 -
.../transport/tcp/WireformatNegociationTest.java | 18 -
...eiveWithTwoConnectionsAndLargeMessagesTest.java | 4 -
.../udp/UdpSendReceiveWithTwoConnectionsTest.java | 3 -
.../activemq/transport/udp/UdpTestSupport.java | 3 -
.../activemq/transport/udp/UdpTransportTest.java | 4 -
.../transport/udp/UdpTransportUsingServerTest.java | 4 -
.../org/apache/activemq/util/MessageIdList.java | 10 -
.../java/org/apache/activemq/util/SocketProxy.java | 23 +-
.../MultiThreadRandomReattachTestBase.java | 8 +-
.../largemessage/LargeMessageTestBase.java | 17 -
.../tests/integration/ra/DummyTransaction.java | 7 -
.../integration/stomp/util/ClientStompFrame.java | 2 +-
.../stomp/util/ClientStompFrameV10.java | 2 +-
.../stomp/util/ClientStompFrameV12.java | 2 +-
.../stomp/util/StompFrameFactoryV11.java | 2 +-
.../core/journal/impl/JournalImplTestBase.java | 12 -
.../core/journal/impl/JournalImplTestUnit.java | 7 +-
.../impl/fakes/FakeSequentialFileFactory.java | 49 --
.../unit/core/postoffice/impl/fakes/FakeQueue.java | 7 -
.../artemis/tests/util/ActiveMQTestBase.java | 152 +----
.../activemq/artemis/tests/util/JMSTestBase.java | 16 +-
.../artemis/tests/util/SingleServerTestBase.java | 4 +-
.../activemq/artemis/tests/util/TcpProxy.java | 9 +-
.../activemq/artemis/utils/TestParameters.java | 4 +-
.../activemq/artemis/utils/network/NetUtil.java | 18 +-
.../activemq/transport/amqp/AmqpSupport.java | 4 +-
.../amqp/client/AmqpAbstractResource.java | 30 +-
.../activemq/transport/amqp/client/AmqpClient.java | 58 +-
.../transport/amqp/client/AmqpConnection.java | 19 +-
.../transport/amqp/client/AmqpEventSink.java | 3 +-
.../transport/amqp/client/AmqpFrameValidator.java | 3 +-
.../transport/amqp/client/AmqpMessage.java | 116 ++--
.../client/AmqpOperationTimedOutException.java | 3 +-
.../transport/amqp/client/AmqpReceiver.java | 225 +++----
.../amqp/client/AmqpRedirectedException.java | 10 +-
.../transport/amqp/client/AmqpResource.java | 45 +-
.../activemq/transport/amqp/client/AmqpSender.java | 76 +--
.../transport/amqp/client/AmqpSession.java | 119 ++--
.../transport/amqp/client/AmqpSupport.java | 17 +-
.../amqp/client/AmqpTransactionContext.java | 3 +-
.../amqp/client/AmqpTransactionCoordinator.java | 4 +-
.../amqp/client/AmqpTransferTagGenerator.java | 15 +-
.../transport/amqp/client/AmqpValidator.java | 4 +-
.../amqp/client/sasl/AbstractMechanism.java | 3 +-
.../transport/amqp/client/sasl/Mechanism.java | 42 +-
.../transport/amqp/client/sasl/PlainMechanism.java | 2 +-
.../amqp/client/sasl/SaslAuthenticator.java | 9 +-
.../transport/amqp/client/util/AsyncResult.java | 13 +-
.../client/util/ClientFutureSynchronization.java | 5 +-
.../amqp/client/util/IOExceptionSupport.java | 6 +-
.../transport/amqp/client/util/IdGenerator.java | 36 +-
.../transport/amqp/client/util/PropertyUtil.java | 83 ++-
.../amqp/client/util/StringArrayConverter.java | 7 +-
.../amqp/client/util/UnmodifiableProxy.java | 5 +-
.../transport/netty/NettyTcpTransport.java | 23 +-
.../transport/netty/NettyTransportFactory.java | 14 +-
.../transport/netty/NettyTransportListener.java | 9 +-
.../transport/netty/NettyTransportOptions.java | 40 +-
.../transport/netty/NettyTransportSslOptions.java | 97 +--
.../transport/netty/NettyTransportSupport.java | 65 +-
.../activemq/transport/netty/NettyWSTransport.java | 15 +-
.../transport/netty/X509AliasKeyManager.java | 5 +-
.../artemis/tests/compatibility/GroovyRun.java | 14 +-
.../tests/compatibility/HQClientTopologyTest.java | 4 +-
.../tests/compatibility/HQFailoverTest.java | 4 +-
.../compatibility/JournalCompatibilityTest.java | 9 +-
.../tests/compatibility/base/TestClassLoader.java | 7 +-
.../artemis/tests/db/paging/PagingTest.java | 26 +-
.../e2e/brokerConnection/ValidateContainer.java | 14 +-
.../artemis/tests/e2e/common/ContainerService.java | 8 +-
.../isolated/web/WebServerComponentTest.java | 7 +-
.../paging/impl/PagingManagerTestAccessor.java | 4 +-
.../server/cluster/impl/BridgeTestAccessor.java | 5 +-
.../artemis/tests/integration/InVMCloseTest.java | 31 +-
.../artemis/tests/integration/SimpleTest.java | 64 +-
.../tests/integration/SingleServerSimpleTest.java | 36 +-
.../tests/integration/String64KLimitTest.java | 7 +-
.../integration/addressing/AddressConfigTest.java | 6 +-
.../integration/amqp/AmqpClientTestSupport.java | 4 +-
.../amqp/AmqpDescribedTypePayloadTest.java | 4 +-
.../integration/amqp/AmqpExpiredMessageTest.java | 12 +-
.../integration/amqp/AmqpFlowControlTest.java | 4 +-
.../amqp/AmqpFullyQualifiedNameTest.java | 1 -
.../tests/integration/amqp/AmqpManagementTest.java | 1 -
.../integration/amqp/AmqpMessageRoutingTest.java | 6 +-
.../amqp/AmqpReceiverDispositionTest.java | 7 +-
.../amqp/AmqpTargetedFQQNSecurityTest.java | 4 +-
.../tests/integration/amqp/AmqpTestSupport.java | 3 +-
.../amqp/DLQAfterExpiredMessageTest.java | 5 +-
.../amqp/PropertyParseOptimizationTest.java | 4 +-
.../connect/AMQPFederationAddressPolicyTest.java | 3 +-
.../connect/AMQPFederationQueuePolicyTest.java | 3 +-
.../integration/amqp/connect/AMQPReplicaTest.java | 12 +-
.../integration/amqp/connect/AckManagerTest.java | 7 +-
.../amqp/connect/MirrorControllerBasicTest.java | 7 +-
.../integration/amqp/connect/PagedMirrorTest.java | 31 +-
.../amqp/connect/QpidDispatchPeerTest.java | 12 +-
.../amqp/connect/SNFPagedMirrorTest.java | 31 +-
.../amqp/connect/ValidateAMQPErrorsTest.java | 10 +-
.../largemessages/AmqpReplicatedTestSupport.java | 3 +-
.../tests/integration/amqp/sasl/SaslScramTest.java | 7 +-
.../tests/integration/client/AckBatchSizeTest.java | 9 +-
.../tests/integration/client/AcknowledgeTest.java | 6 +-
.../integration/client/ActiveMQCrashTest.java | 3 -
.../tests/integration/client/AutogroupIdTest.java | 21 +-
.../client/ConcurrentCreateDeleteProduceTest.java | 8 +-
.../integration/client/ConfirmationWindowTest.java | 37 +-
.../integration/client/ConsumerCloseTest.java | 1 -
.../integration/client/ConsumerFilterTest.java | 10 -
.../tests/integration/client/ConsumerTest.java | 4 -
.../integration/client/ConsumerWindowSizeTest.java | 22 +-
.../integration/client/ExpiryLargeMessageTest.java | 2 -
.../integration/client/FailureDeadlockTest.java | 4 +-
.../FlowControlOnIgnoreLargeMessageBodyTest.java | 3 -
.../tests/integration/client/HangConsumerTest.java | 54 +-
.../client/IncompatibleVersionTest.java | 4 +-
.../client/InterruptedLargeMessageTest.java | 4 -
.../client/JMSPagingFileDeleteTest.java | 5 -
.../integration/client/JmsNettyNioStressTest.java | 31 +-
.../tests/integration/client/JournalCrashTest.java | 4 -
.../client/LargeMessageCompressTest.java | 5 +-
.../tests/integration/client/LargeMessageTest.java | 6 -
.../client/LibaioDependencyCheckTest.java | 5 +-
.../integration/client/MessageBufferTest.java | 31 +-
.../client/MessageConsumerRollbackTest.java | 5 -
.../integration/client/MessagePriorityTest.java | 8 +-
.../client/MultipleThreadFilterOneTest.java | 10 +-
.../integration/client/ReceiveImmediateTest.java | 2 -
.../integration/client/RedeliveryConsumerTest.java | 4 -
.../integration/client/SessionCloseOnGCTest.java | 4 +-
.../client/SessionFactoryCloseTest.java | 7 +-
.../tests/integration/client/SessionTest.java | 2 +-
.../tests/integration/client/SlowConsumerTest.java | 11 +-
.../client/TransactionDurabilityTest.java | 2 -
.../integration/clientcrash/ClientCrashTest.java | 4 +-
.../integration/clientcrash/ClientExitTest.java | 13 +-
.../cluster/bridge/BridgeReconnectTest.java | 8 -
.../integration/cluster/bridge/BridgeTest.java | 9 -
.../bridge/BridgeWithDiscoveryGroupStartTest.java | 3 -
.../bridge/ClusteredBridgeReconnectTest.java | 6 +-
.../cluster/bridge/NettyBridgeReconnectTest.java | 3 -
.../crossprotocol/LargeHeadersClusterTest.java | 5 -
.../ProtocolsMessageLoadBalancingTest.java | 5 -
.../AnycastRoutingWithClusterTest.java | 8 +-
.../AutoDeleteClusteredDestinationTest.java | 32 +-
.../distribution/AutoDeleteDistributedTest.java | 9 +-
.../cluster/distribution/ClusterTestBase.java | 23 +-
.../distribution/ClusteredGroupingTest.java | 3 +-
.../distribution/MessageRedistributionTest.java | 8 +-
.../MessageRedistributionWithDiscoveryTest.java | 4 -
.../distribution/NettySymmetricClusterTest.java | 9 +-
.../distribution/OnewayTwoNodeClusterTest.java | 4 +-
.../RemoteBindingWithoutLoadBalancingTest.java | 5 +-
.../cluster/distribution/SymmetricClusterTest.java | 14 +-
.../distribution/TemporaryJMSQueueClusterTest.java | 31 +-
.../distribution/TemporaryQueueClusterTest.java | 5 +-
.../cluster/distribution/URISimpleClusterTest.java | 2 +-
.../cluster/failover/AsynchronousFailoverTest.java | 2 +-
.../cluster/failover/BackupSyncJournalTest.java | 7 -
.../failover/BackupSyncLargeMessageTest.java | 11 +-
.../ClusterWithBackupFailoverTestBase.java | 3 +-
.../cluster/failover/FailBackAutoTest.java | 6 -
.../cluster/failover/FailBackManualTest.java | 5 -
.../cluster/failover/FailoverListenerTest.java | 15 +-
.../integration/cluster/failover/FailoverTest.java | 14 -
.../cluster/failover/FailoverTestBase.java | 20 +-
.../cluster/failover/FakeServiceComponent.java | 4 +-
.../cluster/failover/LargeMessageFailoverTest.java | 8 -
...ltiplePrimariesMultipleBackupsFailoverTest.java | 2 -
.../failover/NettyReplicatedFailoverTest.java | 21 +-
.../failover/NetworkFailureFailoverTest.java | 7 +-
.../cluster/failover/PagingFailoverTest.java | 1 -
.../failover/PrimaryToPrimaryFailoverTest.java | 3 -
.../failover/QuorumFailOverPrimaryVotesTest.java | 6 +-
.../failover/ReplicatedDistributionTest.java | 4 -
.../cluster/failover/SecurityFailoverTest.java | 6 -
.../cluster/failover/SharedStoreBackupTest.java | 3 +-
.../SinglePrimaryMultipleBackupsFailoverTest.java | 2 -
...agerNettyNoGroupNameReplicatedFailoverTest.java | 4 +-
...eplicatedLargeMessageWithDelayFailoverTest.java | 3 +-
.../reattach/RandomReattachIntegrationTest.java | 3 -
.../integration/cluster/reattach/ReattachTest.java | 4 +-
.../cluster/topology/NonHATopologyTest.java | 5 +-
.../cluster/topology/TopologyClusterTestBase.java | 5 -
.../integration/cluster/util/BackupSyncDelay.java | 17 +-
.../cluster/util/RemoteServerConfiguration.java | 7 +-
.../consumer/DetectOrphanedConsumerTest.java | 4 +-
.../consumer/OrphanedConsumerDefenseTest.java | 8 +-
.../crossprotocol/OpenWireToAMQPTest.java | 4 +-
.../integration/discovery/DiscoveryBaseTest.java | 8 -
.../tests/integration/discovery/DiscoveryTest.java | 48 +-
.../integration/divert/PersistentDivertTest.java | 3 -
.../federation/FederatedAddressTest.java | 3 -
.../integration/federation/FederatedQueueTest.java | 3 -
.../integration/federation/FederatedTestBase.java | 3 -
.../integration/http/CoreClientOverHttpTest.java | 1 -
.../integration/interceptors/InterceptorTest.java | 3 -
.../jms/ActiveMQConnectionFactoryTest.java | 3 -
.../tests/integration/jms/FloodServerTest.java | 3 -
.../integration/jms/ProgrammaticRedeployTest.java | 2 +-
.../tests/integration/jms/RedeployTest.java | 11 +-
.../integration/jms/SimpleJNDIClientTest.java | 3 -
.../integration/jms/client/ConnectionTest.java | 1 -
.../integration/jms/client/ExclusiveTest.java | 3 -
.../tests/integration/jms/client/GroupingTest.java | 13 +-
.../tests/integration/jms/client/LVQTest.java | 3 -
.../jms/client/MessageProducerTest.java | 3 -
.../tests/integration/jms/client/MessageTest.java | 6 -
.../jms/client/NoLocalSubscriberTest.java | 5 +-
.../integration/jms/client/ReceiveNoWaitTest.java | 10 +-
.../jms/client/RemoteConnectionStressTest.java | 3 -
.../tests/integration/jms/client/RollbackTest.java | 31 +-
...ssionClosedOnRemotingConnectionFailureTest.java | 7 -
.../client/SessionMetadataAddExceptionTest.java | 3 +-
.../integration/jms/client/StoreConfigTest.java | 7 -
.../integration/jms/client/TopicCleanupTest.java | 6 +-
.../jms/cluster/JMSFailoverListenerTest.java | 5 +-
.../integration/jms/cluster/JMSFailoverTest.java | 8 +-
.../jms/cluster/LargeMessageOverBridgeTest.java | 10 -
.../connection/CloseDestroyedConnectionTest.java | 2 +-
.../jms/connection/ConcurrentSessionCloseTest.java | 1 -
.../ConnectionFactorySerializationTest.java | 2 +-
...nectionFactoryWithJGroupsSerializationTest.java | 10 +-
.../jms/connection/ExceptionListenerTest.java | 18 +-
.../integration/jms/consumer/JmsConsumerTest.java | 8 +-
.../jms/divert/DivertAndACKClientTest.java | 5 -
.../integration/jms/jms2client/JmsContextTest.java | 17 +-
.../JmsProducerCompletionListenerTest.java | 4 -
.../jms/multiprotocol/JMSFQQNConsumerTest.java | 3 +-
.../jms/server/JMSServerStartStopTest.java | 4 -
.../integration/journal/AIOJournalImplTest.java | 13 +-
.../journal/AIOUnbuferedJournalImplTest.java | 13 +-
.../integration/journal/DuplicateRecordIdTest.java | 31 +-
.../journal/JournalCompactSplitTest.java | 4 -
.../integration/journal/JournalDataPrintTest.java | 31 +-
.../integration/journal/NIOImportExportTest.java | 5 -
.../integration/journal/NIOJournalCompactTest.java | 2 +-
.../management/ManagementActivationTest.java | 24 +-
.../management/ManagementWithPagingServerTest.java | 4 +-
.../integration/management/QueueControlTest.java | 41 +-
.../management/QueueControlUsingCoreTest.java | 15 -
...urityManagementWithConfiguredAdminUserTest.java | 8 +-
.../artemis/tests/integration/mqtt/MQTTTest.java | 7 +-
.../tests/integration/mqtt/MQTTTestSupport.java | 6 +-
.../tests/integration/mqtt/PahoMQTTTest.java | 4 +-
.../mqtt/util/ResourceLoadingSslContext.java | 7 +-
.../artemis/tests/integration/mqtt5/MQTT5Test.java | 12 +-
.../tests/integration/mqtt5/package-info.java | 1 -
.../mqtt5/spec/ControlPacketFormatTests.java | 2 +-
.../integration/mqtt5/spec/DataFormatTests.java | 2 +-
.../mqtt5/spec/EnhancedAuthenticationTests.java | 2 +-
.../integration/mqtt5/spec/FlowControlTests.java | 2 +-
.../integration/mqtt5/spec/HandlingErrorTests.java | 6 +-
.../mqtt5/spec/MessageOrderingTests.java | 2 +-
.../mqtt5/spec/MessageReceiptTests.java | 4 +-
.../mqtt5/spec/NetworkConnectionTests.java | 2 +-
.../tests/integration/mqtt5/spec/QoSTests.java | 2 +-
.../integration/mqtt5/spec/SessionStateTests.java | 2 +-
.../integration/mqtt5/spec/SubscriptionTests.java | 6 +-
.../mqtt5/spec/TopicNameAndFilterTests.java | 2 +-
.../integration/mqtt5/spec/WebSocketTests.java | 3 +-
.../mqtt5/spec/controlpackets/AuthTests.java | 3 +-
.../mqtt5/spec/controlpackets/ConnAckTests.java | 7 +-
.../mqtt5/spec/controlpackets/ConnectTests.java | 2 +-
.../mqtt5/spec/controlpackets/DisconnectTests.java | 2 +-
.../mqtt5/spec/controlpackets/PubAckTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubCompTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubRecTests.java | 4 +-
.../mqtt5/spec/controlpackets/PubRelTests.java | 2 +-
.../mqtt5/spec/controlpackets/PublishTests.java | 76 +--
.../mqtt5/spec/controlpackets/SubAckTests.java | 4 +-
.../mqtt5/spec/controlpackets/SubscribeTests.java | 24 +-
.../mqtt5/spec/controlpackets/UnsubAckTests.java | 2 +-
.../spec/controlpackets/UnsubscribeTests.java | 2 +-
.../mqtt5/spec/controlpackets/package-info.java | 1 -
.../ssl/CertificateAuthenticationSslTests.java | 4 +-
.../integration/openwire/BasicOpenWireTest.java | 5 -
.../integration/openwire/SimpleOpenWireTest.java | 4 -
.../integration/openwire/TempQueueWithDotTest.java | 13 +-
.../openwire/VerySimpleOenwireTest.java | 6 +-
.../openwire/amq/JMSDurableTopicRedeliverTest.java | 2 -
.../openwire/amq/JMSIndividualAckTest.java | 6 -
.../integration/openwire/amq/JmsAutoAckTest.java | 2 -
.../integration/openwire/amq/JmsClientAckTest.java | 8 -
.../openwire/amq/JmsConnectionStartStopTest.java | 10 +-
.../amq/JmsConsumerResetActiveListenerTest.java | 7 +-
.../amq/JmsCreateConsumerInOnMessageTest.java | 4 -
.../amq/JmsDurableTopicSendReceiveTest.java | 2 -
.../openwire/amq/JmsQueueBrowserTest.java | 7 +-
.../openwire/amq/JmsResourceProvider.java | 73 +-
.../openwire/amq/JmsSendReceiveTestSupport.java | 12 -
.../openwire/amq/JmsTopicRedeliverTest.java | 2 -
.../openwire/amq/JmsTopicRequestReplyTest.java | 5 +-
.../openwire/amq/JmsTransactionTestSupport.java | 58 +-
.../openwire/amq/RedeliveryPolicyTest.java | 30 -
.../openwire/interop/GeneralInteropTest.java | 7 +-
.../integration/paging/JournalPagingTest.java | 7 +-
.../integration/paging/PageCountSyncServer.java | 6 +-
.../paging/PageTransactionCleanupTest.java | 2 +-
.../integration/paging/PagingCounterTest.java | 5 -
.../tests/integration/paging/PagingOrderTest.java | 4 +-
.../tests/integration/paging/PagingSendTest.java | 18 +-
.../tests/integration/paging/PagingSyncTest.java | 2 +-
.../paging/PagingWithFailoverBackup.java | 4 +-
.../AddressSettingsConfigurationStorageTest.java | 4 -
.../persistence/JMSStorageManagerTest.java | 4 -
.../persistence/RolesConfigurationStorageTest.java | 4 -
.../persistence/StorageManagerTestBase.java | 11 -
.../persistence/XmlImportExportTest.java | 1 -
.../metrics/AbstractPersistentStatTestSupport.java | 9 -
.../tests/integration/plugin/CacheMetricsTest.java | 31 +-
.../tests/integration/plugin/JvmMetricsTest.java | 31 +-
.../integration/plugin/MetricsPluginTest.java | 31 +-
.../tests/integration/plugin/NettyMetricsTest.java | 31 +-
.../integration/plugin/SystemMetricsTest.java | 31 +-
.../integration/plugin/XmlConfigPluginTest.java | 2 -
.../integration/ra/ActiveMQClusteredTest.java | 8 +-
.../integration/ra/ActiveMQMessageHandlerTest.java | 4 -
.../tests/integration/ra/ResourceAdapterTest.java | 2 -
.../tests/integration/remoting/PingTest.java | 14 +-
.../integration/replication/ReplicationTest.java | 11 +-
.../SharedNothingReplicationFlowControlTest.java | 7 +-
.../integration/scheduling/DelayedMessageTest.java | 3 -
.../scheduling/MultipliedDelayedMessageTest.java | 3 -
.../scheduling/ScheduledMessageTest.java | 3 -
.../integration/security/JMSXUserIDPluginTest.java | 2 -
.../security/PersistedSecuritySettingTest.java | 31 +-
.../tests/integration/security/SecurityTest.java | 15 +-
.../integration/server/AIOFileLockTimeoutTest.java | 9 +-
.../integration/server/NIOFileLockTimeoutTest.java | 9 +-
.../server/PotentialOOMELoggingTest.java | 8 +-
.../integration/server/RetroactiveAddressTest.java | 31 +-
.../integration/server/ScaleDownDirectTest.java | 4 +-
.../integration/server/SimpleStartStopTest.java | 8 +-
.../ssl/CoreClientOverOneWaySSLTest.java | 17 +-
.../artemis/tests/integration/stomp/StompTest.java | 5 -
.../tests/integration/stomp/StompTestBase.java | 4 -
.../stomp/StompWithClientIdValidationTest.java | 4 +-
.../artemis/tests/integration/xa/BasicXaTest.java | 4 -
.../tests/integration/xa/XaTimeoutTest.java | 12 +-
.../artemis/tests/util/JMSClusteredTestBase.java | 12 -
.../tests/util/TransportConfigurationUtils.java | 5 -
.../artemis/jms/tests/AcknowledgementTest.java | 6 +-
.../artemis/jms/tests/CTSMiscellaneousTest.java | 3 +-
.../artemis/jms/tests/ConnectionClosedTest.java | 11 +-
.../artemis/jms/tests/ConnectionFactoryTest.java | 7 +-
.../activemq/artemis/jms/tests/ConnectionTest.java | 4 -
.../artemis/jms/tests/DurableSubscriptionTest.java | 20 +-
.../artemis/jms/tests/MessageConsumerTest.java | 19 +-
.../artemis/jms/tests/MessageProducerTest.java | 3 -
.../jms/tests/MessageWithReadResolveTest.java | 9 +-
.../artemis/jms/tests/MiscellaneousTest.java | 7 -
.../jms/tests/NonDurableSubscriberTest.java | 2 -
.../artemis/jms/tests/PersistenceTest.java | 4 +-
.../activemq/artemis/jms/tests/QueueTest.java | 2 -
.../artemis/jms/tests/ReferenceableTest.java | 2 +-
.../activemq/artemis/jms/tests/SecurityTest.java | 6 +-
.../jms/tests/TemporaryDestinationTest.java | 13 +-
.../activemq/artemis/jms/tests/TopicTest.java | 3 -
.../artemis/jms/tests/TransactedSessionTest.java | 9 +-
.../tests/message/BodyIsAssignableFromTest.java | 10 -
.../jms/tests/message/BytesMessageTest.java | 2 -
.../jms/tests/message/JMSReplyToHeaderTest.java | 5 -
.../jms/tests/message/MessageHeaderTest.java | 178 -----
.../tests/message/ObjectMessageDeliveryTest.java | 8 -
.../jms/tests/message/SimpleJMSBytesMessage.java | 4 -
.../jms/tests/message/SimpleJMSMapMessage.java | 3 -
.../jms/tests/message/SimpleJMSMessage.java | 4 +-
.../artemis/jms/tests/selector/SelectorTest.java | 15 +-
.../artemis/jms/tests/tools/ServerManagement.java | 12 +-
.../tools/container/InVMInitialContextFactory.java | 2 +-
.../artemis/jms/tests/tools/container/Server.java | 78 +--
.../artemis/amqpJMS/ActiveMQAMQPAdmin.java | 3 -
.../artemis/amqpJMS/JoramAMQPAggregationTest.java | 2 -
.../activemq/artemis/common/AbstractAdmin.java | 8 +-
.../artemis/common/testjndi/TestContext.java | 43 +-
.../common/testjndi/TestContextFactory.java | 7 +-
.../artemis/jms/JoramCoreAggregationTest.java | 2 -
.../java/org/objectweb/jtests/jms/admin/Admin.java | 62 +-
.../jms/conform/connection/ConnectionTest.java | 12 +-
.../jms/conform/message/MessageBodyTest.java | 9 +-
.../jms/conform/message/MessageDefaultTest.java | 9 +-
.../jms/conform/message/MessageTypeTest.java | 105 ++-
.../conform/message/headers/MessageHeaderTest.java | 42 +-
.../message/properties/JMSXPropertyTest.java | 10 +-
.../properties/MessagePropertyConversionTest.java | 313 ++++-----
.../message/properties/MessagePropertyTest.java | 63 +-
.../jtests/jms/conform/queue/QueueBrowserTest.java | 14 +-
.../jms/conform/queue/TemporaryQueueTest.java | 6 -
.../jms/conform/selector/SelectorSyntaxTest.java | 30 +-
.../jtests/jms/conform/selector/SelectorTest.java | 49 +-
.../jms/conform/session/QueueSessionTest.java | 21 +-
.../jtests/jms/conform/session/SessionTest.java | 42 +-
.../jms/conform/session/TopicSessionTest.java | 24 +-
.../jms/conform/session/UnifiedSessionTest.java | 56 +-
.../jms/conform/topic/TemporaryTopicTest.java | 6 -
.../jtests/jms/framework/JMSTestCase.java | 18 +-
.../jtests/jms/framework/PTPTestCase.java | 38 +-
.../jtests/jms/framework/PubSubTestCase.java | 38 +-
.../objectweb/jtests/jms/framework/TestConfig.java | 4 +-
.../jtests/jms/framework/UnifiedTestCase.java | 51 +-
.../artemis/tests/leak/FilteredPagingLeakTest.java | 7 +-
.../artemis/tests/leak/JournalLeakTest.java | 5 +-
.../artemis/tests/leak/MemoryAssertions.java | 4 +-
.../tests/leak/MessageReferenceLeakTest.java | 33 +-
.../artemis/tests/leak/PagingLeakTest.java | 5 +-
.../performance/journal/FakeJournalImplTest.java | 3 -
.../paging/MeasurePagingMultiThreadTest.java | 18 -
.../sends/AbstractSendReceivePerfTest.java | 5 +-
.../performance/sends/MeasureCommitPerfTest.java | 2 +-
.../BrokerConnectionBridgeSecurityTest.java | 31 +-
.../BrokerConnectionMirrorSecurityTest.java | 31 +-
.../smoke/brokerConnection/DualFederationTest.java | 31 +-
.../DualMirrorNoContainerTest.java | 31 +-
.../MirrorInfiniteRetryReplicaTest.java | 8 +-
.../brokerConnection/MirroredSubscriptionTest.java | 31 +-
.../brokerConnection/PagedMirrorSmokeTest.java | 31 +-
.../artemis/tests/smoke/console/ConsoleTest.java | 4 +-
.../artemis/tests/smoke/jmx/JmxConnectionTest.java | 34 +-
.../smoke/resourcetest/MaxQueueResourceTest.java | 31 +-
.../smoke/upgradeTest/CompareUpgradeTest.java | 4 +-
.../tests/smoke/upgradeTest/UpgradeTest.java | 35 +-
.../artemis/tests/soak/client/ClientAbstract.java | 12 +-
.../artemis/tests/soak/client/Receiver.java | 12 -
.../activemq/artemis/tests/soak/client/Sender.java | 9 -
.../ClusterNotificationsContinuityTest.java | 42 +-
.../soak/interrupt/JournalFlushInterruptTest.java | 33 +-
.../soak/interruptlm/LargeMessageFrozenTest.java | 4 +-
.../artemis/tests/soak/owleak/OWLeakTest.java | 6 +-
.../tests/soak/paging/FlowControlPagingTest.java | 6 +-
.../tests/soak/paging/HorizontalPagingTest.java | 7 +-
.../tests/soak/paging/MegaCleanerPagingTest.java | 2 +-
.../tests/soak/paging/SubscriptionPagingTest.java | 9 +-
.../soak/replicaTxCheck/ReplicaTXCheckTest.java | 7 +-
.../journal/AIOMultiThreadCompactorStressTest.java | 3 -
.../journal/JournalCleanupCompactStressTest.java | 7 +-
.../stress/journal/JournalRestartStressTest.java | 12 +-
.../stress/journal/LargeJournalStressTest.java | 3 -
.../stress/journal/MixupCompactorTestBase.java | 4 -
.../journal/MultiThreadConsumerStressTest.java | 2 +-
.../journal/NIOMultiThreadCompactorStressTest.java | 15 -
.../tests/stress/paging/PageCursorStressTest.java | 27 -
.../tests/stress/remote/PingStressTest.java | 4 +-
.../core/server/impl/QueueConcurrentTest.java | 4 +-
.../asyncio/MultiThreadAsynchronousFileTest.java | 10 +-
.../core/client/impl/LargeMessageBufferTest.java | 44 +-
.../core/config/impl/ConnectorsServiceTest.java | 6 -
.../unit/core/journal/impl/TimedBufferTest.java | 8 +-
.../tests/unit/core/paging/impl/PageTest.java | 7 -
.../core/paging/impl/PagingManagerImplTest.java | 7 +-
.../unit/core/paging/impl/PagingStoreImplTest.java | 9 +-
.../core/postoffice/impl/BindingsImplTest.java | 47 --
.../impl/WildcardAddressManagerUnitTest.java | 23 +-
.../impl/netty/ChannelBufferWrapper2Test.java | 2 -
.../remoting/impl/netty/NettyConnectorTest.java | 1 -
.../impl/ActiveMQSecurityManagerImplTest.java | 3 -
.../tests/unit/core/server/impl/QueueImplTest.java | 4 -
.../tests/unit/logging/AssertionLoggerTest.java | 6 +-
.../unit/ra/ActiveMQResourceAdapterConfigTest.java | 11 +-
.../unit/ra/ConnectionFactoryPropertiesTest.java | 3 +-
.../artemis/tests/unit/util/FakePagingManager.java | 22 -
.../artemis/tests/unit/util/LinkedListTest.java | 5 +-
.../artemis/tests/unit/util/ReusableLatchTest.java | 12 +-
1515 files changed, 11172 insertions(+), 21052 deletions(-)
diff --git a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java
index 0dc040de38..3539c22fc2 100644
--- a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java
+++ b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java
@@ -28,10 +28,7 @@ import java.util.Comparator;
import java.util.List;
/**
- * <p>
- * A main class which setups up a classpath and then passes
- * execution off to the ActiveMQ Artemis cli main.
- * </p>
+ * A main class which setups up a classpath and then passes execution off to the ActiveMQ Artemis cli main.
*/
public class Artemis {
diff --git a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java
index 4bd816c39d..65436c8f5e 100644
--- a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java
+++ b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/configuration/ArtemisClientConfiguration.java
@@ -28,12 +28,12 @@ public interface ArtemisClientConfiguration {
String REMOTE_CONNECTOR = NettyConnectorFactory.class.getName();
/**
- * @return if present, sends a username for the connection
+ * {@return if present, sends a username for the connection}
*/
String getUsername();
/**
- * @return the password for the connection. If username is set, password must be set
+ * {@return the password for the connection. If username is set, password must be set}
*/
String getPassword();
@@ -45,32 +45,32 @@ public interface ArtemisClientConfiguration {
String getUrl();
/**
- * @return The hostname to connect to
+ * {@return The hostname to connect to}
*/
String getHost();
/**
- * @return the port number to connect to
+ * {@return the port number to connect to}
*/
Integer getPort();
/**
- * @return the connector factory to use for connections.
+ * {@return the connector factory to use for connections}
*/
String getConnectorFactory();
/**
- * @return Whether or not to start the embedded broker
+ * {@return whether to start the embedded broker}
*/
boolean startEmbeddedBroker();
/**
- * @return whether or not this is an HA connection
+ * {@return whether this is an HA connection}
*/
boolean isHa();
/**
- * @return whether or not the authentication parameters should be used
+ * {@return whether the authentication parameters should be used}
*/
boolean hasAuthentication();
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
index 28674b909f..a68738eda0 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
@@ -62,14 +62,13 @@ import picocli.CommandLine.Command;
/**
* Artemis is the main CLI entry point for managing/running a broker.
- *
- * Want to start or debug a broker from an IDE? This is probably the best class to
- * run. Make sure set the -Dartemis.instance=path/to/instance system property.
- * You should also use the 'apache-artemis' module for the class path since that
- * includes all artemis modules.
- *
- * Notice that this class should not use any logging as it's part of the bootstrap and using logging here could
- * disrupt the order of bootstrapping on certain components (e.g. JMX being started from log4j)
+ * <p>
+ * Want to start or debug a broker from an IDE? This is probably the best class to run. Make sure set the
+ * -Dartemis.instance=path/to/instance system property. You should also use the 'apache-artemis' module for the class
+ * path since that includes all artemis modules.
+ * <p>
+ * Notice that this class should not use any logging as it's part of the bootstrap and using logging here could disrupt
+ * the order of bootstrapping on certain components (e.g. JMX being started from log4j)
*/
@Command(name = "artemis", description = "ActiveMQ Artemis Command Line")
public class Artemis implements Runnable {
@@ -194,8 +193,7 @@ public class Artemis implements Runnable {
}
/**
- * This method is used to validate exception returns.
- * Useful on test cases
+ * This method is used to validate exception returns. Useful on test cases.
*/
private static Object internalExecute(boolean shellEnabled, File artemisHome, File artemisInstance, File etcFolder, String[] args) throws Exception {
return internalExecute(shellEnabled, artemisHome, artemisInstance, etcFolder, args, new ActionContext());
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
index b20abe1fd5..b475b6e4a9 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java
@@ -82,9 +82,11 @@ public abstract class ActionAbstract implements Action, Runnable {
@Override
public String getBrokerInstance() {
if (brokerInstance == null) {
- /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
- the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
- reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
+ /*
+ * We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
+ * the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ * reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes.
+ */
brokerInstance = System.getProperty("artemis.instance");
if (brokerInstance != null) {
brokerInstance = brokerInstance.replace("\\", "/");
@@ -188,9 +190,11 @@ public abstract class ActionAbstract implements Action, Runnable {
@Override
public String getBrokerHome() {
if (brokerHome == null) {
- /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
- the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
- reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes. */
+ /*
+ * We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows
+ * the ARTEMIS_HOME variable will include back slashes (An invalid file URI character path separator). For this
+ * reason we overwrite the ARTEMIS_HOME variable with backslashes replaced with forward slashes.
+ */
brokerHome = System.getProperty("artemis.home");
if (brokerHome != null) {
brokerHome = brokerHome.replace("\\", "/");
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
index cec5dae03f..9a6a29a454 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
@@ -34,7 +34,7 @@ import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
/**
- * Abstract class where we can replace the configuration in various places *
+ * Abstract class where we can replace the configuration in various places
*/
public abstract class Configurable extends ActionAbstract {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
index b600056add..375d4d803e 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/InputAbstract.java
@@ -28,8 +28,9 @@ public class InputAbstract extends ActionAbstract {
private static boolean inputEnabled = false;
/**
- * Test cases validating or using the CLI cannot deal with inputs,
- * so they are generally disabled, however the main method from the CLI will enable it back. */
+ * Test cases validating or using the CLI cannot deal with inputs, so they are generally disabled, however the main
+ * method from the CLI will enable it back.
+ */
public static void enableInput() {
inputEnabled = true;
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
index a8f56fa7cd..7eb70011b1 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
@@ -61,10 +61,8 @@ public class Run extends LockAbstract {
private Timer shutdownTimer;
/**
- * This will disable the System.exit at the end of the server.stop, as that means there are other things
- * happening on the same VM.
- *
- * @param embedded
+ * This will disable the System.exit at the end of the server.stop, as that means there are other things happening on
+ * the same VM.
*/
public static void setEmbedded(boolean embedded) {
Run.embedded = true;
@@ -164,8 +162,6 @@ public class Run extends LockAbstract {
/**
* Add a simple shutdown hook to stop the server.
- *
- * @param configurationDir
*/
private void addShutdownHook(File configurationDir) {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
index e118cd2278..3f59777dbb 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/helper/HelperCreate.java
@@ -30,8 +30,10 @@ import org.apache.activemq.artemis.cli.Artemis;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/** This is a class simulating what the Artemis Maven Plugin does.
- * You may use by creating a new instance, filling the properties, and calling the method create */
+/**
+ * This is a class simulating what the Artemis Maven Plugin does. You may use by creating a new instance, filling the
+ * properties, and calling the method create
+ */
public class HelperCreate extends HelperBase {
public HelperCreate(String homeProperty) {
@@ -76,9 +78,6 @@ public class HelperCreate extends HelperBase {
private boolean failoverOnShutdown = false;
- /**
- * it will disable auto-tune
- */
private boolean noAutoTune = true;
private String messageLoadBalancing = "ON_DEMAND";
@@ -384,5 +383,4 @@ public class HelperCreate extends HelperBase {
}
}
}
-
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
index 49f5d4c29f..297a3f9ccd 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/AsyncJms2ProducerFacade.java
@@ -132,8 +132,8 @@ public final class AsyncJms2ProducerFacade {
}
/**
- * if {@code true}, a subsequent {@link #trySend} would return {@link SendAttemptResult#Success}.<br>
- * Otherwise, a subsequent {@link #trySend} would return {@link SendAttemptResult#NotAvailable}.
+ * If {@code true}, a subsequent {@link #trySend} would return {@link SendAttemptResult#Success}. Otherwise, a
+ * subsequent {@link #trySend} would return {@link SendAttemptResult#NotAvailable}.
*/
private boolean isAvailable() {
if (maxPending > 0 && pending == maxPending) {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
index da96323200..7ade8fbf05 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/perf/PaddingDecimalFormat.java
@@ -26,8 +26,8 @@ public class PaddingDecimalFormat extends DecimalFormat {
private final StringBuilder pad;
/**
- * Creates a PaddingDecimalFormat using the given pattern and minimum {@code minLength} and the symbols for the default
- * locale.
+ * Creates a PaddingDecimalFormat using the given pattern and minimum {@code minLength} and the symbols for the
+ * default locale.
*/
public PaddingDecimalFormat(String pattern, int minLength) {
super(pattern);
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
index 055d9bce86..7bc59464f4 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
@@ -430,16 +430,10 @@ public class PrintData extends DBOption {
private PageCursorsInfo() {
}
- /**
- * @return the pgTXs
- */
Set<Long> getPgTXs() {
return pgTXs;
}
- /**
- * @return the cursorRecords
- */
Map<Long, Set<PagePosition>> getCursorRecords() {
return cursorRecords;
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageExporter.java
index 3f823a5b12..859d271a8f 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageExporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageExporter.java
@@ -31,7 +31,9 @@ import org.apache.activemq.artemis.core.server.LargeServerMessage;
import org.apache.activemq.artemis.reader.TextMessageUtil;
-/** This is an Utility class that will import the outputs in XML format. */
+/**
+ * This is an Utility class that will import the outputs in XML format.
+ */
public class XMLMessageExporter {
private static final int LARGE_MESSAGE_CHUNK_SIZE = 1000;
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageImporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageImporter.java
index 8140b7548d..e4bca3ca6b 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageImporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XMLMessageImporter.java
@@ -37,7 +37,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
-/** This is an Utility class that will import the outputs in XML format. */
+/**
+ * This is an Utility class that will import the outputs in XML format.
+ */
public class XMLMessageImporter {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -236,7 +238,7 @@ public class XMLMessageImporter {
* to be combined to reconstruct the Base64 encoded string. You can't decode bits and pieces of each CDATA. Each
* CDATA has to be decoded in its entirety.
*
- * @param processor used to deal with the decoded CDATA elements
+ * @param processor used to deal with the decoded CDATA elements
* @param decodeTextMessage If this a text message we decode UTF8 and encode as a simple string
*/
private void getMessageBodyBytes(MessageBodyBytesProcessor processor, boolean decodeTextMessage) throws IOException, XMLStreamException {
@@ -247,7 +249,8 @@ public class XMLMessageImporter {
if (currentEventType == XMLStreamConstants.END_ELEMENT) {
break;
} else if (currentEventType == XMLStreamConstants.CHARACTERS && reader.isWhiteSpace() && !cdata.isEmpty()) {
- /* when we hit a whitespace CHARACTERS event we know that the entire CDATA is complete so decode, pass back to
+ /*
+ * when we hit a whitespace CHARACTERS event we know that the entire CDATA is complete so decode, pass back to
* the processor, and reset the cdata for the next event(s)
*/
if (decodeTextMessage) {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataConstants.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataConstants.java
index 10b0a665d0..4f6696c306 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataConstants.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataConstants.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.cli.commands.tools.xml;
/**
- * The constants shared by <code>org.apache.activemq.tools.XmlDataImporter</code> and
- * <code>org.apache.activemq.tools.XmlDataExporter</code>.
+ * The constants shared by {@code org.apache.activemq.tools.XmlDataImporter} and
+ * {@code org.apache.activemq.tools.XmlDataExporter}.
*/
public final class XmlDataConstants {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
index 66ca7250a8..3dee30d117 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java
@@ -130,13 +130,6 @@ public final class XmlDataExporter extends DBOption {
/**
* Use setConfiguration and process(out) instead.
- *
- * @param out
- * @param bindingsDir
- * @param journalDir
- * @param pagingDir
- * @param largeMessagesDir
- * @throws Exception
*/
@Deprecated
public void process(OutputStream out,
@@ -409,9 +402,10 @@ public final class XmlDataExporter extends DBOption {
exporter.printSingleMessageAsXML(message, queues, false);
messagesPrinted++;
}
+
/**
- * Reads from the page files and prints messages as it finds them (making sure to check acks and transactions
- * from the journal).
+ * Reads from the page files and prints messages as it finds them (making sure to check acks and transactions from
+ * the journal).
*/
private void printPagedMessagesAsXML() {
try {
@@ -509,7 +503,7 @@ public final class XmlDataExporter extends DBOption {
}
/**
- * Proxy to handle indenting the XML since <code>javax.xml.stream.XMLStreamWriter</code> doesn't support that.
+ * Proxy to handle indenting the XML since {@code javax.xml.stream.XMLStreamWriter} doesn't support that.
*/
public static class PrettyPrintHandler implements InvocationHandler {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataImporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataImporter.java
index b21bd59fc0..2c326e8f4b 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataImporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataImporter.java
@@ -64,9 +64,9 @@ import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
/**
- * Read XML output from <code>org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataExporter</code>, create a core session, and
- * send the messages to a running instance of ActiveMQ Artemis. It uses the StAX <code>javax.xml.stream.XMLStreamReader</code>
- * for speed and simplicity.
+ * Read XML output from {@code org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataExporter}, create a core
+ * session, and send the messages to a running instance of ActiveMQ Artemis. It uses the StAX
+ * {@code javax.xml.stream.XMLStreamReader} for speed and simplicity.
*/
@Command(name = "imp", description = "Import all message-data using an XML that could be interpreted by any system.")
public final class XmlDataImporter extends ConnectionConfigurationAbtract {
@@ -130,9 +130,9 @@ public final class XmlDataImporter extends ConnectionConfigurationAbtract {
/**
* This is the normal constructor for programmatic access to the
- * <code>org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporter</code> if the session passed
- * in uses auto-commit for sends.
- * <br>
+ * {@code org.apache.activemq.artemis.core.persistence.impl.journal.XmlDataImporter} if the session passed in uses
+ * auto-commit for sends.
+ * <p>
* If the session needs to be transactional then use the constructor which takes 2 sessions.
*
* @param inputStream the stream from which to read the XML for import
@@ -144,9 +144,9 @@ public final class XmlDataImporter extends ConnectionConfigurationAbtract {
/**
* This is the constructor to use if you wish to import all messages transactionally.
- * <br>
- * Pass in a session which doesn't use auto-commit for sends, and one that does (for management
- * operations necessary during import).
+ * <p>
+ * Pass in a session which doesn't use auto-commit for sends, and one that does (for management operations necessary
+ * during import).
*
* @param inputStream the stream from which to read the XML for import
* @param session used for sending messages, doesn't need to auto-commit sends
@@ -511,6 +511,4 @@ public final class XmlDataImporter extends ConnectionConfigurationAbtract {
logger.debug("Binding {} already exists so won't re-bind.", addressName);
}
}
-
-
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
index 3f91ef7de8..54a7683e4d 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/AddUser.java
@@ -23,7 +23,7 @@ import picocli.CommandLine.Option;
/**
* Adding a new user, example:
- * ./artemis user add --user-command-user guest --role admin --user-command-password ***
+ * {@literal ./artemis user add --user-command-user guest --role admin --user-command-password ***}
*/
@Command(name = "add", description = "Add a user.")
public class AddUser extends PasswordAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
index de17056cbc..43b271fb0c 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/RemoveUser.java
@@ -22,7 +22,9 @@ import picocli.CommandLine.Command;
/**
* Remove a user, example:
+ * <pre>{@code
* ./artemis user rm --user guest
+ * }</pre>
*/
@Command(name = "rm", description = "Remove an existing user.")
public class RemoveUser extends UserAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
index 795d1b739e..bd782b7553 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/ResetUser.java
@@ -23,7 +23,9 @@ import picocli.CommandLine.Option;
/**
* Reset a user's password or roles, example:
+ * <pre>{@code
* ./artemis user reset --user guest --role admin --password ***
+ * }</pre>
*/
@Command(name = "reset", description = "Reset user's password or roles.")
public class ResetUser extends PasswordAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
index df43ac2f6a..8743beefb6 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/SyncCalculation.java
@@ -37,7 +37,6 @@ import org.apache.activemq.artemis.utils.ReusableLatch;
/**
* It will perform a simple test to evaluate how many syncs a disk can make per second
- * * *
*/
public class SyncCalculation {
@@ -45,13 +44,16 @@ public class SyncCalculation {
private static final long MAX_FLUSH_NANOS = TimeUnit.SECONDS.toNanos(5);
/**
- * It will perform {@code tries} write tests of {@code blockSize * blocks} bytes and returning the lowest elapsed time to perform a try.
- *
+ * It will perform {@code tries} write tests of {@code blockSize * blocks} bytes and returning the lowest elapsed
+ * time to perform a try. *
* <p>
- * Please configure {@code blocks >= -XX:CompileThreshold} (ie by default on most JVMs is 10000) to favour the best JIT/OSR compilation (ie: Just In Time/On Stack Replacement)
- * if the test is running on a temporary file-system (eg: tmpfs on Linux) or without {@code fsync}.
+ * Please configure {@code blocks >= -XX:CompileThreshold} (ie by default on most JVMs is 10000) to favour the best
+ * JIT/OSR compilation (ie: Just In Time/On Stack Replacement) if the test is running on a temporary file-system (eg:
+ * tmpfs on Linux) or without {@code fsync}.
* <p>
- * NOTE: The write latencies are provided only if {@code verbose && !(journalType == JournalType.ASYNCIO && !syncWrites)} (ie are used effective synchronous writes).
+ * NOTE: The write latencies are provided only if
+ * {@code verbose && !(journalType == JournalType.ASYNCIO && !syncWrites)} (ie are used effective synchronous
+ * writes).
*
* @param datafolder the folder where the journal files will be stored
* @param blockSize the size in bytes of each write on the journal
@@ -59,12 +61,12 @@ public class SyncCalculation {
* @param tries the number of tests
* @param verbose {@code true} to make the output verbose, {@code false} otherwise
* @param fsync if {@code true} the test is performing full durable writes, {@code false} otherwise
- * @param syncWrites if {@code true} each write is performed only if the previous one is completed, {@code false} otherwise (ie each try will wait only the last write)
+ * @param syncWrites if {@code true} each write is performed only if the previous one is completed, {@code false}
+ * otherwise (ie each try will wait only the last write)
* @param fileName the name of the journal file used for the test
* @param maxAIO the max number of in-flight IO requests (if {@code journalType} will support it)
* @param journalType the {@link JournalType} used for the tests
* @return the lowest elapsed time (in {@link TimeUnit#MILLISECONDS}) to perform a try
- * @throws Exception
*/
public static long syncTest(File datafolder,
int blockSize,
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
index 2732d3caae..303c956701 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java
@@ -46,14 +46,10 @@ public class ProcessBuilder {
}
/**
- * *
- *
* @param logname the prefix for log output
* @param location The location where this command is being executed from
* @param hook it will finish the process upon shutdown of the VM
* @param args The arguments being passwed to the the CLI tool
- * @return
- * @throws Exception
*/
public static Process build(String logname, File location, boolean hook, String... args) throws Exception {
boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().trim().startsWith("win");
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
index 154a9dca7b..b64b32dbb4 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java
@@ -125,10 +125,10 @@ public class FileBroker implements Broker {
components = fileDeploymentManager.buildService(securityManager, ManagementFactory.getPlatformMBeanServer(), activateCallback);
}
- /*
- * this makes sure the components are started in the correct order. Its simple at the mo as e only have core and jms but
- * will need impproving if we get more.
- * */
+ /**
+ * This makes sure the components are started in the correct order. Its simple at the mo as e only have core and jms
+ * but will need impproving if we get more.
+ */
private List<ActiveMQComponent> getComponentsByStartOrder(Map<String, ActiveMQComponent> components) {
List<ActiveMQComponent> activeMQComponents = new ArrayList<>();
ActiveMQComponent jmsComponent = components.get("jms");
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java
index 5bf52e5695..a77385d27f 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java
@@ -41,12 +41,10 @@ public class ServerUtil {
}
/**
- * @param artemisInstance
- * @param serverName it will be used on logs
- * @param id it will be used to add on the port
- * @param timeout
- * @return
- * @throws Exception
+ * Start the server.
+ *
+ * @param serverName it will be used on logs
+ * @param id it will be used to add on the port
*/
public static Process startServer(String artemisInstance, String serverName, int id, int timeout) throws Exception {
return startServer(artemisInstance, serverName, id, timeout, null);
@@ -122,8 +120,7 @@ public class ServerUtil {
ProcessLogger outputLogger = new ProcessLogger(true, process.getInputStream(), jobName, false);
outputLogger.start();
- // Adding a reader to System.err, so the VM won't hang on a System.err.println as identified on this forum thread:
- // http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151815
+ // Adding a reader to System.err, so the VM won't hang on a System.err.println
ProcessLogger errorLogger = new ProcessLogger(true, process.getErrorStream(), jobName, true);
errorLogger.start();
return process;
diff --git a/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java b/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
index 7b980e6b4a..1732034236 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/artemis/cli/commands/CreateTest.java
@@ -84,7 +84,7 @@ public class CreateTest extends CliTestBase {
* If it parses, the xml is assumed to be valid. If any exceptions occur, the xml is not valid.
*
* @param xml The xml file to check for validity.
- * @return whether the xml file represents a valid xml document.
+ * @return whether the xml file represents a valid xml document
*/
private boolean isXmlValid(File xml) {
try {
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index ab89be4151..d6e624d28b 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -1329,9 +1329,7 @@ public class ArtemisTest extends CliTestBase {
*/
assertEquals(100L, Artemis.internalExecute(false, null, null, null, new String[] {"producer", "--destination", "queue://q1", "--message-count", "100", "--password", "admin"}, context));
- /*
- * This is the same as above except it will prompt the user to re-enter both the URL and the username.
- */
+ // This is the same as above except it will prompt the user to re-enter both the URL and the username.
in = new ByteArrayInputStream("tcp://localhost:61616\nadmin\n".getBytes());
context = new ActionContext(in, System.out, System.err);
assertEquals(100L, Artemis.internalExecute(false, null, null, null, new String[] {"producer", "--destination", "queue://q1", "--message-count", "100", "--password", "admin", "--url", "tcp://badhost:11111"}, context));
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java
index 1b42d48e9e..c3c2dde7d9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java
@@ -33,21 +33,17 @@ import io.netty.buffer.ByteBuf;
public interface ActiveMQBuffer extends DataInput {
/**
- * Returns the underlying Netty's ByteBuf
- *
- * @return the underlying Netty's ByteBuf
+ * {@return the underlying Netty's ByteBuf}
*/
ByteBuf byteBuf();
/**
- * Returns the number of bytes this buffer can contain.
- *
- * @return the number of bytes this buffer can contain.
+ * {@return the number of bytes this buffer can contain}
*/
int capacity();
/**
- * @return the {@code readerIndex} of this buffer.
+ * {@return the {@code readerIndex} of this buffer.}
*/
int readerIndex();
@@ -55,14 +51,13 @@ public interface ActiveMQBuffer extends DataInput {
* Sets the {@code readerIndex} of this buffer.
*
* @param readerIndex The reader's index
- * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is
- * less than {@code 0} or
- * greater than {@code this.writerIndex}
+ * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is less than {@code 0} or greater than
+ * {@code this.writerIndex}
*/
void readerIndex(int readerIndex);
/**
- * @return the {@code writerIndex} of this buffer.
+ * {@return the {@code writerIndex} of this buffer.}
*/
int writerIndex();
@@ -70,17 +65,15 @@ public interface ActiveMQBuffer extends DataInput {
* Sets the {@code writerIndex} of this buffer.
*
* @param writerIndex The writer's index
- * @throws IndexOutOfBoundsException if the specified {@code writerIndex} is
- * less than {@code this.readerIndex} or
+ * @throws IndexOutOfBoundsException if the specified {@code writerIndex} is less than {@code this.readerIndex} or
* greater than {@code this.capacity}
*/
void writerIndex(int writerIndex);
/**
- * Sets the {@code readerIndex} and {@code writerIndex} of this buffer
- * in one shot. This method is useful when you have to worry about the
- * invocation order of {@link #readerIndex(int)} and {@link #writerIndex(int)}
- * methods. For example, the following code will fail:
+ * Sets the {@code readerIndex} and {@code writerIndex} of this buffer in one shot. This method is useful when you
+ * have to worry about the invocation order of {@link #readerIndex(int)} and {@link #writerIndex(int)} methods. For
+ * example, the following code will fail:
*
* <pre>
* // Create a buffer whose readerIndex, writerIndex and capacity are
@@ -92,7 +85,7 @@ public interface ActiveMQBuffer extends DataInput {
* buf.readerIndex(2);
* buf.writerIndex(4);
* </pre>
- *
+ * <p>
* The following code will also fail:
*
* <pre>
@@ -108,11 +101,9 @@ public interface ActiveMQBuffer extends DataInput {
* buf.writerIndex(4);
* buf.readerIndex(2);
* </pre>
- *
- * By contrast, {@link #setIndex(int, int)} guarantees that it never
- * throws an {@link IndexOutOfBoundsException} as long as the specified
- * indexes meet basic constraints, regardless what the current index
- * values of the buffer are:
+ * <p>
+ * By contrast, {@link #setIndex(int, int)} guarantees that it never throws an {@link IndexOutOfBoundsException} as
+ * long as the specified indexes meet basic constraints, regardless what the current index values of the buffer are:
*
* <pre>
* // No matter what the current state of the buffer is, the following
@@ -123,72 +114,64 @@ public interface ActiveMQBuffer extends DataInput {
*
* @param readerIndex The reader's index
* @param writerIndex The writer's index
- * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is less than 0,
- * if the specified {@code writerIndex} is less than the specified
- * {@code readerIndex} or if the specified {@code writerIndex} is
- * greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code readerIndex} is less than 0, if the specified
+ * {@code writerIndex} is less than the specified {@code readerIndex} or if the
+ * specified {@code writerIndex} is greater than {@code this.capacity}
*/
void setIndex(int readerIndex, int writerIndex);
/**
- * @return the number of readable bytes which is equal to {@code (this.writerIndex - this.readerIndex)}.
+ * {@return the number of readable bytes which is equal to {@code (this.writerIndex - this.readerIndex)}}
*/
int readableBytes();
/**
- * @return the number of writable bytes which is equal to {@code (this.capacity - this.writerIndex)}.
+ * {@return the number of writable bytes which is equal to {@code (this.capacity - this.writerIndex)}}
*/
int writableBytes();
/**
- * @return {@code true} if and only if {@code (this.writerIndex - this.readerIndex)} is greater than {@code 0}.
+ * {@return {@code true} if and only if {@code (this.writerIndex - this.readerIndex)} is greater than {@code 0}}
*/
boolean readable();
/**
- * @return {@code true}if and only if {@code (this.capacity - this.writerIndex)} is greater than {@code 0}.
+ * {@return {@code true}if and only if {@code (this.capacity - this.writerIndex)} is greater than {@code 0}}
*/
boolean writable();
/**
- * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to
- * {@code 0}.
- * This method is identical to {@link #setIndex(int, int) setIndex(0, 0)}.
+ * Sets the {@code readerIndex} and {@code writerIndex} of this buffer to {@code 0}. This method is identical to
+ * {@link #setIndex(int, int) setIndex(0, 0)}.
* <p>
- * Please note that the behavior of this method is different
- * from that of NIO buffer, which sets the {@code limit} to
+ * Please note that the behavior of this method is different from that of NIO buffer, which sets the {@code limit} to
* the {@code capacity} of the buffer.
*/
void clear();
/**
- * Marks the current {@code readerIndex} in this buffer. You can
- * reposition the current {@code readerIndex} to the marked
- * {@code readerIndex} by calling {@link #resetReaderIndex()}.
- * The initial value of the marked {@code readerIndex} is {@code 0}.
+ * Marks the current {@code readerIndex} in this buffer. You can reposition the current {@code readerIndex} to the
+ * marked {@code readerIndex} by calling {@link #resetReaderIndex()}. The initial value of the marked
+ * {@code readerIndex} is {@code 0}.
*/
void markReaderIndex();
/**
- * Repositions the current {@code readerIndex} to the marked
- * {@code readerIndex} in this buffer.
+ * Repositions the current {@code readerIndex} to the marked {@code readerIndex} in this buffer.
*
- * @throws IndexOutOfBoundsException if the current {@code writerIndex} is less than the marked
- * {@code readerIndex}
+ * @throws IndexOutOfBoundsException if the current {@code writerIndex} is less than the marked {@code readerIndex}
*/
void resetReaderIndex();
/**
- * Marks the current {@code writerIndex} in this buffer. You can
- * reposition the current {@code writerIndex} to the marked
- * {@code writerIndex} by calling {@link #resetWriterIndex()}.
- * The initial value of the marked {@code writerIndex} is {@code 0}.
+ * Marks the current {@code writerIndex} in this buffer. You can reposition the current {@code writerIndex} to the
+ * marked {@code writerIndex} by calling {@link #resetWriterIndex()}. The initial value of the marked
+ * {@code writerIndex} is {@code 0}.
*/
void markWriterIndex();
/**
- * Repositions the current {@code writerIndex} to the marked
- * {@code writerIndex} in this buffer.
+ * Repositions the current {@code writerIndex} to the marked {@code writerIndex} in this buffer.
*
* @throws IndexOutOfBoundsException if the current {@code readerIndex} is greater than the marked
* {@code writerIndex}
@@ -196,440 +179,373 @@ public interface ActiveMQBuffer extends DataInput {
void resetWriterIndex();
/**
- * Discards the bytes between the 0th index and {@code readerIndex}.
- * It moves the bytes between {@code readerIndex} and {@code writerIndex}
- * to the 0th index, and sets {@code readerIndex} and {@code writerIndex}
- * to {@code 0} and {@code oldWriterIndex - oldReaderIndex} respectively.
+ * Discards the bytes between the 0th index and {@code readerIndex}. It moves the bytes between {@code readerIndex}
+ * and {@code writerIndex} to the 0th index, and sets {@code readerIndex} and {@code writerIndex} to {@code 0} and
+ * {@code oldWriterIndex - oldReaderIndex} respectively.
* <p>
* Please refer to the class documentation for more detailed explanation.
*/
void discardReadBytes();
/**
- * Gets a byte at the specified absolute {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Gets a byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return The byte at the specified index
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
byte getByte(int index);
/**
- * Gets an unsigned byte at the specified absolute {@code index} in this
- * buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets an unsigned byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return an unsigned byte at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
short getUnsignedByte(int index);
/**
- * Gets a 16-bit short integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 16-bit short integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 16-bit short integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
short getShort(int index);
/**
- * Gets an unsigned 16-bit short integer at the specified absolute
- * {@code index} in this buffer. This method does not modify
- * {@code readerIndex} or {@code writerIndex} of this buffer.
+ * Gets an unsigned 16-bit short integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return an unsigned 16-bit short integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
int getUnsignedShort(int index);
/**
- * Gets a 32-bit integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 32-bit integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 32-bit integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
int getInt(int index);
/**
- * Gets an unsigned 32-bit integer at the specified absolute {@code index}
- * in this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets an unsigned 32-bit integer at the specified absolute {@code index} in this buffer. This method does not
+ * modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index The index into this buffer
* @return an unsigned 32-bit integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
long getUnsignedInt(int index);
/**
- * Gets a 64-bit long integer at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a 64-bit long integer at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a 64-bit long integer at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
long getLong(int index);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index} until the destination becomes
- * non-writable. This method is basically same with
- * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code writerIndex} of the destination by the
- * number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index} until
+ * the destination becomes non-writable. This method is basically same with
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this method increases the {@code writerIndex} of the
+ * destination by the number of the transferred bytes while {@link #getBytes(int, ActiveMQBuffer, int, int)} does
+ * not. This method does not modify {@code readerIndex} or {@code writerIndex} of the source buffer (i.e.
+ * {@code this}).
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.writableBytes} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.writableBytes} is greater than {@code this.capacity}
*/
void getBytes(int index, ActiveMQBuffer dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}. This method is basically same
- * with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code writerIndex} of the destination by the
- * number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method is basically same with {@link #getBytes(int, ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code writerIndex} of the destination by the number of the transferred bytes while
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of the source buffer (i.e. {@code this}).
*
* @param length the number of bytes to transfer
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code length} is greater than {@code dst.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if {@code index + length}
+ * is greater than {@code this.capacity}, or if {@code length} is greater than
+ * {@code dst.writableBytes}
*/
void getBytes(int index, ActiveMQBuffer dst, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of both the source (i.e. {@code this}) and the destination.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of both the source (i.e. {@code this}) and the
+ * destination.
*
* @param dst The destination bufferIndex the first index of the destination
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param dstIndex The index into the destination bufferThe destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code dstIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code dstIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code dstIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code dstIndex + length} is greater than
* {@code dst.capacity}
*/
void getBytes(int index, ActiveMQBuffer dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.length} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.length} is greater than {@code this.capacity}
*/
void getBytes(int index, byte[] dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of this buffer.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param dstIndex The first index of the destination
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code dstIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code dstIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code dstIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code dstIndex + length} is greater than
* {@code dst.length}
*/
void getBytes(int index, byte[] dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the specified absolute {@code index} until the destination's position
- * reaches its limit.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer while the destination's {@code position} will be increased.
+ * Transfers this buffer's data to the specified destination starting at the specified absolute {@code index} until
+ * the destination's position reaches its limit. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer while the destination's {@code position} will be increased.
*
* @param index Index into the buffer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + dst.remaining()} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + dst.remaining()} is greater than {@code this.capacity}
*/
void getBytes(int index, ByteBuffer dst);
/**
- * Gets a char at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a char at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a char at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
char getChar(int index);
/**
- * Gets a float at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a float at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a float at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
float getFloat(int index);
/**
- * Gets a double at the specified absolute {@code index} in
- * this buffer. This method does not modify {@code readerIndex} or
- * {@code writerIndex} of this buffer.
+ * Gets a double at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @return a double at the specified absolute {@code index}
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
double getDouble(int index);
/**
- * Sets the specified byte at the specified absolute {@code index} in this
- * buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified byte at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified byte
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 1} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 1} is
+ * greater than {@code this.capacity}
*/
void setByte(int index, byte value);
/**
- * Sets the specified 16-bit short integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 16-bit short integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 16-bit short integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
void setShort(int index, short value);
/**
- * Sets the specified 32-bit integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 32-bit integer at the specified absolute {@code index} in this buffer. This method does not
+ * modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 32-bit integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
void setInt(int index, int value);
/**
- * Sets the specified 64-bit long integer at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified 64-bit long integer at the specified absolute {@code index} in this buffer. This method does
+ * not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified 64-bit long integer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
void setLong(int index, long value);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index} until the destination becomes
- * unreadable. This method is basically same with
- * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code readerIndex} of the source buffer by
- * the number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index} until
+ * the destination becomes unreadable. This method is basically same with
+ * {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this method increases the {@code readerIndex} of the
+ * source buffer by the number of the transferred bytes while {@link #getBytes(int, ActiveMQBuffer, int, int)} does
+ * not. This method does not modify {@code readerIndex} or {@code writerIndex} of the source buffer (i.e.
+ * {@code this}).
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.readableBytes} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.readableBytes} is greater than {@code this.capacity}
*/
void setBytes(int index, ActiveMQBuffer src);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index}. This method is basically same
- * with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this
- * method increases the {@code readerIndex} of the source buffer by
- * the number of the transferred bytes while
- * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * the source buffer (i.e. {@code this}).
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index}. This
+ * method is basically same with {@link #setBytes(int, ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code readerIndex} of the source buffer by the number of the transferred bytes while
+ * {@link #getBytes(int, ActiveMQBuffer, int, int)} does not. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of the source buffer (i.e. {@code this}).
*
* @param length the number of bytes to transfer
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code length} is greater than {@code src.readableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if {@code index + length}
+ * is greater than {@code this.capacity}, or if {@code length} is greater than
+ * {@code src.readableBytes}
*/
void setBytes(int index, ActiveMQBuffer src, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex}
- * of both the source (i.e. {@code this}) and the destination.
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of both the source (i.e. {@code this}) and the
+ * destination.
*
* @param src The source bufferIndex the first index of the source
* @param length The number of bytes to transfer
* @param index Index into the buffer
* @param srcIndex The source buffer index
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code srcIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code srcIndex + length} is greater than
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code srcIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code srcIndex + length} is greater than
* {@code src.capacity}
*/
void setBytes(int index, ActiveMQBuffer src, int srcIndex, int length);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source array's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.length} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.length} is greater than {@code this.capacity}
*/
void setBytes(int index, byte[] src);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the specified absolute {@code index}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source array's data to this buffer starting at the specified absolute {@code index}. This
+ * method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
* @param srcIndex The source buffer index
* @param length The number of bytes to transfer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0},
- * if the specified {@code srcIndex} is less than {@code 0},
- * if {@code index + length} is greater than
- * {@code this.capacity}, or
- * if {@code srcIndex + length} is greater than {@code src.length}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0}, if the specified
+ * {@code srcIndex} is less than {@code 0}, if {@code index + length} is greater
+ * than {@code this.capacity}, or if {@code srcIndex + length} is greater than
+ * {@code src.length}
*/
void setBytes(int index, byte[] src, int srcIndex, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the specified absolute {@code index} until the source buffer's position
- * reaches its limit.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Transfers the specified source buffer's data to this buffer starting at the specified absolute {@code index} until
+ * the source buffer's position reaches its limit. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * if {@code index + src.remaining()} is greater than
- * {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or if
+ * {@code index + src.remaining()} is greater than {@code this.capacity}
*/
void setBytes(int index, ByteBuffer src);
/**
- * Sets the specified char at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified char at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified char
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 2} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 2} is
+ * greater than {@code this.capacity}
*/
void setChar(int index, char value);
/**
- * Sets the specified float at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified float at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified float
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 4} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 4} is
+ * greater than {@code this.capacity}
*/
void setFloat(int index, float value);
/**
- * Sets the specified double at the specified absolute
- * {@code index} in this buffer.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Sets the specified double at the specified absolute {@code index} in this buffer. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param value The specified double
- * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or
- * {@code index + 8} is greater than {@code this.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code index} is less than {@code 0} or {@code index + 8} is
+ * greater than {@code this.capacity}
*/
void setDouble(int index, double value);
/**
- * Gets a byte at the current {@code readerIndex} and increases
- * the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a byte at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in this buffer.
*
* @return a byte at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -638,8 +554,8 @@ public interface ActiveMQBuffer extends DataInput {
byte readByte();
/**
- * Gets an unsigned byte at the current {@code readerIndex} and increases
- * the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets an unsigned byte at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in
+ * this buffer.
*
* @return an unsigned byte at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -648,8 +564,8 @@ public interface ActiveMQBuffer extends DataInput {
int readUnsignedByte();
/**
- * Gets a 16-bit short integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets a 16-bit short integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 2}
+ * in this buffer.
*
* @return a 16-bit short integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -658,8 +574,8 @@ public interface ActiveMQBuffer extends DataInput {
short readShort();
/**
- * Gets an unsigned 16-bit short integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets an unsigned 16-bit short integer at the current {@code readerIndex} and increases the {@code readerIndex} by
+ * {@code 2} in this buffer.
*
* @return an unsigned 16-bit short integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -668,8 +584,8 @@ public interface ActiveMQBuffer extends DataInput {
int readUnsignedShort();
/**
- * Gets a 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a 32-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 4} in
+ * this buffer.
*
* @return a 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -678,8 +594,8 @@ public interface ActiveMQBuffer extends DataInput {
int readInt();
/**
- * Gets a (potentially {@code null}) 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a (potentially {@code null}) 32-bit integer at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by {@code 4} in this buffer.
*
* @return a (potentially {@code null}) 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -687,8 +603,8 @@ public interface ActiveMQBuffer extends DataInput {
Integer readNullableInt();
/**
- * Gets an unsigned 32-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets an unsigned 32-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by
+ * {@code 4} in this buffer.
*
* @return an unsigned 32-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -696,8 +612,8 @@ public interface ActiveMQBuffer extends DataInput {
long readUnsignedInt();
/**
- * Gets a 64-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a 64-bit integer at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 8} in
+ * this buffer.
*
* @return a 64-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -706,8 +622,8 @@ public interface ActiveMQBuffer extends DataInput {
long readLong();
/**
- * Gets a (potentially {@code null}) 64-bit integer at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a (potentially {@code null}) 64-bit integer at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by {@code 8} in this buffer.
*
* @return a (potentially {@code null}) 64-bit integer at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -715,8 +631,7 @@ public interface ActiveMQBuffer extends DataInput {
Long readNullableLong();
/**
- * Gets a char at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 2} in this buffer.
+ * Gets a char at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 2} in this buffer.
*
* @return a char at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2}
@@ -725,8 +640,8 @@ public interface ActiveMQBuffer extends DataInput {
char readChar();
/**
- * Gets a float at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 4} in this buffer.
+ * Gets a float at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 4} in this
+ * buffer.
*
* @return a float at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4}
@@ -735,8 +650,8 @@ public interface ActiveMQBuffer extends DataInput {
float readFloat();
/**
- * Gets a double at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 8} in this buffer.
+ * Gets a double at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 8} in this
+ * buffer.
*
* @return a double at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8}
@@ -745,8 +660,8 @@ public interface ActiveMQBuffer extends DataInput {
double readDouble();
/**
- * Gets a boolean at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a boolean at the current {@code readerIndex} and increases the {@code readerIndex} by {@code 1} in this
+ * buffer.
*
* @return a boolean at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -755,8 +670,8 @@ public interface ActiveMQBuffer extends DataInput {
boolean readBoolean();
/**
- * Gets a (potentially {@code null}) boolean at the current {@code readerIndex}
- * and increases the {@code readerIndex} by {@code 1} in this buffer.
+ * Gets a (potentially {@code null}) boolean at the current {@code readerIndex} and increases the {@code readerIndex}
+ * by {@code 1} in this buffer.
*
* @return a (potentially {@code null}) boolean at the current {@code readerIndex}
* @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1}
@@ -800,9 +715,8 @@ public interface ActiveMQBuffer extends DataInput {
String readUTF();
/**
- * Returns a new slice of this buffer's sub-region starting at the current
- * {@code readerIndex} and increases the {@code readerIndex} by the size
- * of the new slice (= {@code length}).
+ * Returns a new slice of this buffer's sub-region starting at the current {@code readerIndex} and increases the
+ * {@code readerIndex} by the size of the new slice (= {@code length}).
*
* @param length the size of the new slice
* @return the newly created slice
@@ -811,56 +725,47 @@ public interface ActiveMQBuffer extends DataInput {
ActiveMQBuffer readSlice(int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} until the destination becomes
- * non-writable, and increases the {@code readerIndex} by the number of the
- * transferred bytes. This method is basically same with
- * {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method
- * increases the {@code writerIndex} of the destination by the number of
- * the transferred bytes while {@link #readBytes(ActiveMQBuffer, int, int)}
- * does not.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} until the
+ * destination becomes non-writable, and increases the {@code readerIndex} by the number of the transferred bytes.
+ * This method is basically same with {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method increases
+ * the {@code writerIndex} of the destination by the number of the transferred bytes while
+ * {@link #readBytes(ActiveMQBuffer, int, int)} does not.
*
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if {@code dst.writableBytes} is greater than
- * {@code this.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code dst.writableBytes} is greater than {@code this.readableBytes}
*/
void readBytes(ActiveMQBuffer dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}). This method
- * is basically same with {@link #readBytes(ActiveMQBuffer, int, int)},
- * except that this method increases the {@code writerIndex} of the
- * destination by the number of the transferred bytes (= {@code length})
- * while {@link #readBytes(ActiveMQBuffer, int, int)} does not.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}). This method is
+ * basically same with {@link #readBytes(ActiveMQBuffer, int, int)}, except that this method increases the
+ * {@code writerIndex} of the destination by the number of the transferred bytes (= {@code length}) while
+ * {@link #readBytes(ActiveMQBuffer, int, int)} does not.
*
* @param dst The destination buffer
* @param length The number of bytes to transfer
- * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes} or
- * if {@code length} is greater than {@code dst.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes} or if
+ * {@code length} is greater than {@code dst.writableBytes}
*/
void readBytes(ActiveMQBuffer dst, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param dstIndex The destination buffer index
* @param length the number of bytes to transfer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0},
- * if {@code length} is greater than {@code this.readableBytes}, or
- * if {@code dstIndex + length} is greater than
- * {@code dst.capacity}
+ * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0}, if {@code length} is
+ * greater than {@code this.readableBytes}, or if {@code dstIndex + length} is
+ * greater than {@code dst.capacity}
*/
void readBytes(ActiveMQBuffer dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code dst.length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code dst.length}).
*
* @param dst The destination buffer
* @throws IndexOutOfBoundsException if {@code dst.length} is greater than {@code this.readableBytes}
@@ -868,34 +773,30 @@ public interface ActiveMQBuffer extends DataInput {
void readBytes(byte[] dst);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} and increases the {@code readerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} and
+ * increases the {@code readerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param dstIndex The destination bufferIndex
* @param length the number of bytes to transfer
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0},
- * if {@code length} is greater than {@code this.readableBytes}, or
- * if {@code dstIndex + length} is greater than {@code dst.length}
+ * @throws IndexOutOfBoundsException if the specified {@code dstIndex} is less than {@code 0}, if {@code length} is
+ * greater than {@code this.readableBytes}, or if {@code dstIndex + length} is
+ * greater than {@code dst.length}
*/
void readBytes(byte[] dst, int dstIndex, int length);
/**
- * Transfers this buffer's data to the specified destination starting at
- * the current {@code readerIndex} until the destination's position
- * reaches its limit, and increases the {@code readerIndex} by the
- * number of the transferred bytes.
+ * Transfers this buffer's data to the specified destination starting at the current {@code readerIndex} until the
+ * destination's position reaches its limit, and increases the {@code readerIndex} by the number of the transferred
+ * bytes.
*
* @param dst The destination buffer
- * @throws IndexOutOfBoundsException if {@code dst.remaining()} is greater than
- * {@code this.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code dst.remaining()} is greater than {@code this.readableBytes}
*/
void readBytes(ByteBuffer dst);
/**
- * Increases the current {@code readerIndex} by the specified
- * {@code length} in this buffer.
+ * Increases the current {@code readerIndex} by the specified {@code length} in this buffer.
*
* @param length The number of bytes to skip
* @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes}
@@ -904,8 +805,8 @@ public interface ActiveMQBuffer extends DataInput {
int skipBytes(int length);
/**
- * Sets the specified byte at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 1} in this buffer.
+ * Sets the specified byte at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 1} in
+ * this buffer.
*
* @param value The specified byte
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 1}
@@ -913,9 +814,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeByte(byte value);
/**
- * Sets the specified 16-bit short integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 2}
- * in this buffer.
+ * Sets the specified 16-bit short integer at the current {@code writerIndex} and increases the {@code writerIndex}
+ * by {@code 2} in this buffer.
*
* @param value The specified 16-bit short integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 2}
@@ -923,8 +823,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeShort(short value);
/**
- * Sets the specified 32-bit integer at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified 32-bit integer at the current {@code writerIndex} and increases the {@code writerIndex} by
+ * {@code 4} in this buffer.
*
* @param value The specified 32-bit integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -932,8 +832,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeInt(int value);
/**
- * Sets the specified (potentially {@code null}) 32-bit integer at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified (potentially {@code null}) 32-bit integer at the current {@code writerIndex} and increases the
+ * {@code writerIndex} by {@code 4} in this buffer.
*
* @param value The specified (potentially {@code null}) 32-bit integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -941,9 +841,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeNullableInt(Integer value);
/**
- * Sets the specified 64-bit long integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 8}
- * in this buffer.
+ * Sets the specified 64-bit long integer at the current {@code writerIndex} and increases the {@code writerIndex} by
+ * {@code 8} in this buffer.
*
* @param value The specified 64-bit long integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -951,9 +850,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeLong(long value);
/**
- * Sets the specified (potentially {@code null}) 64-bit long integer at the current
- * {@code writerIndex} and increases the {@code writerIndex} by {@code 8}
- * in this buffer.
+ * Sets the specified (potentially {@code null}) 64-bit long integer at the current {@code writerIndex} and increases
+ * the {@code writerIndex} by {@code 8} in this buffer.
*
* @param value The specified (potentially {@code null}) 64-bit long integer
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -961,8 +859,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeNullableLong(Long value);
/**
- * Sets the specified char at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 2} in this buffer.
+ * Sets the specified char at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 2} in
+ * this buffer.
*
* @param chr The specified char
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 2}
@@ -970,8 +868,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeChar(char chr);
/**
- * Sets the specified float at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 4} in this buffer.
+ * Sets the specified float at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 4} in
+ * this buffer.
*
* @param value The specified float
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4}
@@ -979,8 +877,8 @@ public interface ActiveMQBuffer extends DataInput {
void writeFloat(float value);
/**
- * Sets the specified double at the current {@code writerIndex}
- * and increases the {@code writerIndex} by {@code 8} in this buffer.
+ * Sets the specified double at the current {@code writerIndex} and increases the {@code writerIndex} by {@code 8} in
+ * this buffer.
*
* @param value The specified double
* @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8}
@@ -1038,40 +936,35 @@ public interface ActiveMQBuffer extends DataInput {
void writeUTF(String utf);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}). This method
- * is basically same with {@link #writeBytes(ActiveMQBuffer, int, int)},
- * except that this method increases the {@code readerIndex} of the source
- * buffer by the number of the transferred bytes (= {@code length}) while
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}). This method is
+ * basically same with {@link #writeBytes(ActiveMQBuffer, int, int)}, except that this method increases the
+ * {@code readerIndex} of the source buffer by the number of the transferred bytes (= {@code length}) while
* {@link #writeBytes(ActiveMQBuffer, int, int)} does not.
*
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.writableBytes} or
- * if {@code length} is greater then {@code src.readableBytes}
+ * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.writableBytes} or if
+ * {@code length} is greater then {@code src.readableBytes}
*/
void writeBytes(ActiveMQBuffer src, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param srcIndex the first index of the source
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0},
- * if {@code srcIndex + length} is greater than
- * {@code src.capacity}, or
- * if {@code length} is greater than {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0}, if
+ * {@code srcIndex + length} is greater than {@code src.capacity}, or if
+ * {@code length} is greater than {@code this.writableBytes}
*/
void writeBytes(ActiveMQBuffer src, int srcIndex, int length);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code src.length}).
+ * Transfers the specified source array's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code src.length}).
*
* @param src The source buffer
* @throws IndexOutOfBoundsException if {@code src.length} is greater than {@code this.writableBytes}
@@ -1079,123 +972,103 @@ public interface ActiveMQBuffer extends DataInput {
void writeBytes(byte[] src);
/**
- * Transfers the specified source array's data to this buffer starting at
- * the current {@code writerIndex} and increases the {@code writerIndex}
- * by the number of the transferred bytes (= {@code length}).
+ * Transfers the specified source array's data to this buffer starting at the current {@code writerIndex} and
+ * increases the {@code writerIndex} by the number of the transferred bytes (= {@code length}).
*
* @param srcIndex the first index of the source
* @param length the number of bytes to transfer
* @param src The source buffer
- * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0},
- * if {@code srcIndex + length} is greater than
- * {@code src.length}, or
- * if {@code length} is greater than {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if the specified {@code srcIndex} is less than {@code 0}, if
+ * {@code srcIndex + length} is greater than {@code src.length}, or if
+ * {@code length} is greater than {@code this.writableBytes}
*/
void writeBytes(byte[] src, int srcIndex, int length);
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} until the source buffer's position
- * reaches its limit, and increases the {@code writerIndex} by the
- * number of the transferred bytes.
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} until the
+ * source buffer's position reaches its limit, and increases the {@code writerIndex} by the number of the transferred
+ * bytes.
*
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than
- * {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than {@code this.writableBytes}
*/
void writeBytes(ByteBuffer src);
-
/**
- * Transfers the specified source buffer's data to this buffer starting at
- * the current {@code writerIndex} until the source buffer's position
- * reaches its limit, and increases the {@code writerIndex} by the
- * number of the transferred bytes.
+ * Transfers the specified source buffer's data to this buffer starting at the current {@code writerIndex} until the
+ * source buffer's position reaches its limit, and increases the {@code writerIndex} by the number of the transferred
+ * bytes.
*
* @param src The source buffer
- * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than
- * {@code this.writableBytes}
+ * @throws IndexOutOfBoundsException if {@code src.remaining()} is greater than {@code this.writableBytes}
*/
void writeBytes(ByteBuf src, int srcIndex, int length);
/**
- * Returns a copy of this buffer's readable bytes. Modifying the content
- * of the returned buffer or this buffer does not affect each other at all.
- * This method is identical to {@code buf.copy(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a copy of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer does
+ * not affect each other at all. This method is identical to
+ * {@code buf.copy(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
- * @return a copy of this buffer's readable bytes.
+ * @return a copy of this buffer's readable bytes
*/
ActiveMQBuffer copy();
/**
- * Returns a copy of this buffer's sub-region. Modifying the content of
- * the returned buffer or this buffer does not affect each other at all.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a copy of this buffer's sub-region. Modifying the content of the returned buffer or this buffer does not
+ * affect each other at all. This method does not modify {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes to copy
- * @return a copy of this buffer's readable bytes.
+ * @return a copy of this buffer's readable bytes
*/
ActiveMQBuffer copy(int index, int length);
/**
- * Returns a slice of this buffer's readable bytes. Modifying the content
- * of the returned buffer or this buffer affects each other's content
- * while they maintain separate indexes and marks. This method is
- * identical to {@code buf.slice(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a slice of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer
+ * affects each other's content while they maintain separate indexes and marks. This method is identical to
+ * {@code buf.slice(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @return a slice of this buffer's readable bytes
*/
ActiveMQBuffer slice();
/**
- * Returns a slice of this buffer's sub-region. Modifying the content of
- * the returned buffer or this buffer affects each other's content while
- * they maintain separate indexes and marks.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Returns a slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects
+ * each other's content while they maintain separate indexes and marks. This method does not modify
+ * {@code readerIndex} or {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes
- * @return a slice of this buffer's sub-region.
+ * @return a slice of this buffer's sub-region
*/
ActiveMQBuffer slice(int index, int length);
/**
- * Returns a buffer which shares the whole region of this buffer.
- * Modifying the content of the returned buffer or this buffer affects
- * each other's content while they maintain separate indexes and marks.
- * This method is identical to {@code buf.slice(0, buf.capacity())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
+ * Returns a buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or
+ * this buffer affects each other's content while they maintain separate indexes and marks. This method is identical
+ * to {@code buf.slice(0, buf.capacity())}. This method does not modify {@code readerIndex} or {@code writerIndex} of
* this buffer.
*
- * @return a buffer which shares the whole region of this buffer.
+ * @return a buffer which shares the whole region of this buffer
*/
ActiveMQBuffer duplicate();
/**
- * Converts this buffer's readable bytes into a NIO buffer. The returned
- * buffer might or might not share the content with this buffer, while
- * they have separate indexes and marks. This method is identical to
- * {@code buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Converts this buffer's readable bytes into a NIO buffer. The returned buffer might or might not share the content
+ * with this buffer, while they have separate indexes and marks. This method is identical to
+ * {@code buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}. This method does not modify {@code readerIndex}
+ * or {@code writerIndex} of this buffer.
*
* @return A converted NIO ByteBuffer
*/
ByteBuffer toByteBuffer();
/**
- * Converts this buffer's sub-region into a NIO buffer. The returned
- * buffer might or might not share the content with this buffer, while
- * they have separate indexes and marks.
- * This method does not modify {@code readerIndex} or {@code writerIndex} of
- * this buffer.
+ * Converts this buffer's sub-region into a NIO buffer. The returned buffer might or might not share the content
+ * with this buffer, while they have separate indexes and marks. This method does not modify {@code readerIndex} or
+ * {@code writerIndex} of this buffer.
*
* @param index Index into the buffer
* @param length The number of bytes
@@ -1204,8 +1077,8 @@ public interface ActiveMQBuffer extends DataInput {
ByteBuffer toByteBuffer(int index, int length);
/**
- * Release any underlying resources held by this buffer
- */
+ * Release any underlying resources held by this buffer
+ */
void release();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
index 328d3c8038..057803c8e8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffers.java
@@ -60,7 +60,7 @@ public final class ActiveMQBuffers {
/**
* Creates an ActiveMQBuffer wrapping an underlying NIO ByteBuffer
- *
+ * <p>
* The position on this buffer won't affect the position on the inner buffer
*
* @param underlying the underlying NIO ByteBuffer
@@ -76,7 +76,7 @@ public final class ActiveMQBuffers {
/**
* Creates an ActiveMQBuffer wrapping an underlying ByteBuf
- *
+ * <p>
* The position on this buffer won't affect the position on the inner buffer
*
* @param underlying the underlying NIO ByteBuffer
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
index 056ec290ce..d96a141d11 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQException.java
@@ -44,9 +44,9 @@ public class ActiveMQException extends Exception {
this.type = type;
}
- /*
- * This constructor is needed only for the native layer
- */
+ /**
+ * This constructor is needed only for the native layer
+ */
public ActiveMQException(int code, String msg) {
super(msg);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
index 3ee855b06d..f5a8935caa 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQIllegalStateException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * An ActiveMQ Artemis resource is not in a legal state (e.g. calling ClientConsumer.receive() if a
- * MessageHandler is set).
+ * An ActiveMQ Artemis resource is not in a legal state (e.g. calling ClientConsumer.receive() if a MessageHandler is
+ * set).
*/
public final class ActiveMQIllegalStateException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
index e52c113bf4..f1ac0c1860 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQInterceptorRejectedPacketException.java
@@ -20,7 +20,6 @@ package org.apache.activemq.artemis.api.core;
* An outgoing interceptor returned false.
* See org.apache.activemq.artemis.api.core.client.ServerLocator#addOutgoingInterceptor(org.apache.activemq.artemis.api.core.Interceptor)
*/
-// XXX I doubt any reader will make much sense of this Javadoc's text.
public final class ActiveMQInterceptorRejectedPacketException extends ActiveMQException {
private static final long serialVersionUID = -5798841227645281815L;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
index 77c45b93cb..bfe649afe9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQLargeMessageInterruptedException.java
@@ -16,9 +16,6 @@
*/
package org.apache.activemq.artemis.api.core;
-/**
- */
-// XXX
public class ActiveMQLargeMessageInterruptedException extends ActiveMQException {
private static final long serialVersionUID = 0;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
index 1ed755d2ba..90a529261c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQNativeIOError.java
@@ -19,7 +19,6 @@ package org.apache.activemq.artemis.api.core;
/**
* An error has happened at ActiveMQ's native (non-Java) code used in reading and writing data.
*/
-// XXX
public final class ActiveMQNativeIOError extends ActiveMQException {
private static final long serialVersionUID = 2355120980683293085L;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
index 06dad546e5..46e0c178cf 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQObjectClosedException.java
@@ -17,8 +17,7 @@
package org.apache.activemq.artemis.api.core;
/**
- * A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is
- * closed.
+ * A client operation failed because the calling resource (ClientSession, ClientProducer, etc.) is closed.
*/
public final class ActiveMQObjectClosedException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
index 9d44b7d557..ba89a8a323 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQRemoteDisconnectException.java
@@ -19,7 +19,7 @@ package org.apache.activemq.artemis.api.core;
import static org.apache.activemq.artemis.api.core.ActiveMQExceptionType.REMOTE_DISCONNECT;
/**
- * A security problem occurred (authentication issues, permission issues,...)
+ * A security problem occurred (authentication issues, permission issues, etc.)
*/
public final class ActiveMQRemoteDisconnectException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
index b0075c3d15..eebff32c40 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQReplicationTimeooutException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * The creation of a session was rejected by the server (e.g. if the server is starting and has not
- * finish to be initialized.
+ * The creation of a session was rejected by the server (e.g. if the server is starting and has not finish to be
+ * initialized.
*/
public final class ActiveMQReplicationTimeooutException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
index da51b3836d..4ab8f34396 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSecurityException.java
@@ -19,7 +19,7 @@ package org.apache.activemq.artemis.api.core;
import static org.apache.activemq.artemis.api.core.ActiveMQExceptionType.SECURITY_EXCEPTION;
/**
- * A security problem occurred (authentication issues, permission issues,...)
+ * A security problem occurred (authentication issues, permission issues, etc.)
*/
public final class ActiveMQSecurityException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
index a2c973a4f9..2be9bb810c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQSessionCreationException.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * The creation of a session was rejected by the server (e.g. if the server is starting and has not
- * finish to be initialized.
+ * The creation of a session was rejected by the server (e.g. if the server is starting and has not finish to be
+ * initialized.
*/
public final class ActiveMQSessionCreationException extends ActiveMQException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
index d6afbbe972..daebf2745a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ParameterisedAddress.java
@@ -112,13 +112,11 @@ public class ParameterisedAddress {
}
/**
- * Given an address string, extract only the query portion if the address is
- * parameterized, otherwise return an empty {@link Map}.
+ * Given an address string, extract only the query portion if the address is parameterized, otherwise return an empty
+ * {@link Map}.
*
- * @param address
- * The address to operate on.
- *
- * @return a {@link Map} containing the parameters associated with the given address.
+ * @param address The address to operate on.
+ * @return a {@link Map} containing the parameters associated with the given address
*/
@SuppressWarnings("unchecked")
public static Map<String, String> extractParameters(String address) {
@@ -132,13 +130,11 @@ public class ParameterisedAddress {
}
/**
- * Given an address string, extract only the address portion if the address is
- * parameterized, otherwise just return the provided address.
- *
- * @param address
- * The address to operate on.
+ * Given an address string, extract only the address portion if the address is parameterized, otherwise just return
+ * the provided address.
*
- * @return the original address minus any appended parameters.
+ * @param address The address to operate on.
+ * @return the original address minus any appended parameters
*/
public static String extractAddress(String address) {
final int index = address != null ? address.indexOf('?') : -1;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/QueueConfiguration.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/QueueConfiguration.java
index 7f4ce79d7c..db768d7614 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/QueueConfiguration.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/QueueConfiguration.java
@@ -114,9 +114,8 @@ public class QueueConfiguration implements Serializable {
/**
* Instance factory which invokes {@link #setName(SimpleString)}
*
- * @see #setName(SimpleString)
- *
* @param name the name to use for the queue
+ * @see #setName(SimpleString)
*/
public static QueueConfiguration of(final String name) {
return new QueueConfiguration(name);
@@ -125,16 +124,15 @@ public class QueueConfiguration implements Serializable {
/**
* Instance factory which invokes {@link #setName(SimpleString)}
*
- * @see #setName(SimpleString)
- *
* @param name the name to use for the queue
+ * @see #setName(SimpleString)
*/
public static QueueConfiguration of(final SimpleString name) {
return new QueueConfiguration(name);
}
/**
- * @param queueConfiguration create a copy of this
+ * {@return the {@code QueueConfiguration} instance which is a copy of the input parameter}
*/
public static QueueConfiguration of(final QueueConfiguration queueConfiguration) {
return new QueueConfiguration(queueConfiguration);
@@ -149,10 +147,8 @@ public class QueueConfiguration implements Serializable {
}
/**
- * @deprecated
- * Use {@link #of(QueueConfiguration)} instead.
- *
* @param o create a copy of this
+ * @deprecated Use {@link #of(QueueConfiguration)} instead.
*/
@Deprecated(forRemoval = true)
public QueueConfiguration(final QueueConfiguration o) {
@@ -193,12 +189,9 @@ public class QueueConfiguration implements Serializable {
/**
* Instantiate this object and invoke {@link #setName(SimpleString)}
*
- * @see #setName(SimpleString)
- *
- * @deprecated
- * Use {@link #of(SimpleString)} instead.
- *
* @param name the name to use for the queue
+ * @see #setName(SimpleString)
+ * @deprecated Use {@link #of(SimpleString)} instead.
*/
@Deprecated(forRemoval = true)
public QueueConfiguration(SimpleString name) {
@@ -208,12 +201,9 @@ public class QueueConfiguration implements Serializable {
/**
* Instantiate this object and invoke {@link #setName(SimpleString)}
*
- * @see #setName(SimpleString)
- *
- * @deprecated
- * Use {@link #of(String)} instead.
- *
* @param name the name to use for the queue
+ * @see #setName(SimpleString)
+ * @deprecated Use {@link #of(String)} instead.
*/
@Deprecated(forRemoval = true)
public QueueConfiguration(String name) {
@@ -259,7 +249,7 @@ public class QueueConfiguration implements Serializable {
* example, if you pass the value "TRUE" for the key "auto-created" the {@code String} "TRUE" will be converted to
* the {@code Boolean} {@code true}.
*
- * @param key the key to set to the value
+ * @param key the key to set to the value
* @param value the value to set for the key
* @return this {@code QueueConfiguration}
*/
@@ -340,7 +330,7 @@ public class QueueConfiguration implements Serializable {
}
/**
- * @return the name of the address; if the address is {@code null} then return the value of {@link #getName()}.
+ * {@return the name of the address; if the address is {@code null} then return the value of {@link #getName()}}
*/
public SimpleString getAddress() {
return address == null ? getName() : address;
@@ -366,6 +356,8 @@ public class QueueConfiguration implements Serializable {
}
/**
+ * Converts the input {@code String} and invokes {@link #setAddress(SimpleString)}
+ *
* @see QueueConfiguration#setAddress(SimpleString)
*/
public QueueConfiguration setAddress(String address) {
@@ -396,6 +388,8 @@ public class QueueConfiguration implements Serializable {
}
/**
+ * Converts the input {@code String} and invokes {@link #setName(SimpleString)}
+ *
* @see QueueConfiguration#setName(SimpleString)
*/
public QueueConfiguration setName(String name) {
@@ -442,7 +436,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code true}
- * @return
*/
public Boolean isDurable() {
return durable == null ? true : durable;
@@ -639,7 +632,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code false}
- * @return
*/
public Boolean isConfigurationManaged() {
return configurationManaged == null ? false : configurationManaged;
@@ -652,7 +644,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code false}
- * @return
*/
public Boolean isTemporary() {
return temporary == null ? false : temporary;
@@ -674,7 +665,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code false}
- * @return
*/
public Boolean isInternal() {
return internal == null ? false : internal;
@@ -687,7 +677,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code false}
- * @return
*/
public Boolean isTransient() {
return _transient == null ? false : _transient;
@@ -700,7 +689,6 @@ public class QueueConfiguration implements Serializable {
/**
* defaults to {@code false}
- * @return
*/
public Boolean isAutoCreated() {
return autoCreated == null ? false : autoCreated;
@@ -715,7 +703,6 @@ public class QueueConfiguration implements Serializable {
* Based on if the name or address uses FQQN when set
*
* defaults to {@code false}
- * @return
*/
public Boolean isFqqn() {
return fqqn == null ? Boolean.FALSE : fqqn;
@@ -834,7 +821,6 @@ public class QueueConfiguration implements Serializable {
* This method returns a {@code QueueConfiguration} created from the JSON-formatted input {@code String}. The input
* should be a simple object of key/value pairs. Valid keys are referenced in {@link #set(String, String)}.
*
- * @param jsonString
* @return the {@code QueueConfiguration} created from the JSON-formatted input {@code String}
*/
public static QueueConfiguration fromJSON(String jsonString) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
index ef28b3466a..8bcb084856 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java
@@ -28,8 +28,8 @@ import org.apache.activemq.artemis.utils.ByteUtil;
import org.apache.activemq.artemis.utils.DataConstants;
/**
- * A simple String class that can store all characters, and stores as simple {@code byte[]}, this
- * minimises expensive copying between String objects.
+ * A simple String class that can store all characters, and stores as simple {@code byte[]}, this minimises expensive
+ * copying between String objects.
* <p>
* This object is used heavily throughout ActiveMQ Artemis for performance reasons.
*/
@@ -47,7 +47,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private transient String[] paths;
-
/**
* Returns a SimpleString constructed from the {@code string} parameter.
* <p>
@@ -102,11 +101,9 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
* <p>
* If {@code string} is {@code null}, the return value will be {@code null} too.
*
- * @deprecated
- * Use {@link #of(String)} instead.
- *
* @param string String used to instantiate a SimpleString.
* @return A new SimpleString
+ * @deprecated Use {@link #of(String)} instead.
*/
@Deprecated(forRemoval = true)
public static SimpleString toSimpleString(final String string) {
@@ -118,12 +115,10 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
* <p>
* If {@code string} is {@code null}, the return value will be {@code null} too.
*
- * @deprecated
- * Use {@link #of(String, StringSimpleStringPool)} instead.
- *
* @param string String used to instantiate a SimpleString.
* @param pool The pool from which to create the SimpleString
* @return A new SimpleString
+ * @deprecated Use {@link #of(String, StringSimpleStringPool)} instead.
*/
@Deprecated(forRemoval = true)
public static SimpleString toSimpleString(final String string, StringSimpleStringPool pool) {
@@ -133,10 +128,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
/**
* creates a SimpleString from a conventional String
*
- * @deprecated
- * Use {@link #of(String)} instead.
- *
* @param string the string to transform
+ * @deprecated Use {@link #of(String)} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final String string) {
@@ -164,10 +157,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
/**
* creates a SimpleString from a byte array
*
- * @deprecated
- * Use {@link #of(byte[])} instead.
- *
* @param data the byte array to use
+ * @deprecated Use {@link #of(byte[])} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final byte[] data) {
@@ -177,10 +168,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
/**
* creates a SimpleString from a character
*
- * @deprecated
- * Use {@link #of(char)} instead.
- *
* @param c the char to use
+ * @deprecated Use {@link #of(char)} instead.
*/
@Deprecated(forRemoval = true)
public SimpleString(final char c) {
@@ -309,19 +298,17 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
}
/**
- * returns the underlying byte array of this SimpleString
- *
- * @return the byte array
+ * {@return the underlying byte array of this {@code SimpleString}}
*/
public byte[] getData() {
return data;
}
/**
- * returns true if the SimpleString parameter starts with the same data as this one. false if not.
+ * {@return {@code true} if the {@code SimpleString} parameter starts with the same data as this one, otherwise
+ * {@code false}}
*
* @param other the SimpleString to look for
- * @return true if this SimpleString starts with the same data
*/
public boolean startsWith(final SimpleString other) {
byte[] otherdata = other.data;
@@ -373,9 +360,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
}
/**
- * note the result of the first use is cached, the separator is configured on
- * the postoffice so will be static for the duration of a server instance.
- * calling with different separator values could give invalid results
+ * note the result of the first use is cached, the separator is configured on the postoffice so will be static for
+ * the duration of a server instance. calling with different separator values could give invalid results
*
* @param separator value from wildcardConfiguration
* @return String[] reference to the split paths or the cached value if previously called
@@ -417,8 +403,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
* Returns {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s},
* {@code false} otherwise.
* <p>
- * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie starting right after the
- * length field.
+ * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie
+ * starting right after the length field.
*/
public boolean equals(final ByteBuf byteBuf, final int offset, final int length) {
return ByteUtil.equals(data, byteBuf, offset, length);
@@ -438,8 +424,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
}
/**
- * Splits this SimpleString into an array of SimpleString using the char param as the delimiter.
- * i.e. "a.b" would return "a" and "b" if . was the delimiter
+ * Splits this SimpleString into an array of SimpleString using the char param as the delimiter. i.e. "a.b" would
+ * return "a" and "b" if . was the delimiter
*
* @param delim The delimiter to split this SimpleString on.
* @return An array of SimpleStrings
@@ -547,7 +533,7 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
* checks to see if this SimpleString contains the char parameter passed in
*
* @param c the char to check for
- * @return true if the char is found, false otherwise.
+ * @return true if the char is found, false otherwise
*/
public boolean contains(final char c) {
if (this.str != null) {
@@ -630,29 +616,25 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
}
/**
- * returns the size of this SimpleString
- *
- * @return the size
+ * {@return the size of this SimpleString}
*/
public int sizeof() {
return DataConstants.SIZE_INT + data.length;
}
/**
- * returns the size of a SimpleString
+ * {@return the size of a SimpleString}
*
* @param str the SimpleString to check
- * @return the size
*/
public static int sizeofString(final SimpleString str) {
return str.sizeof();
}
/**
- * returns the size of a SimpleString which could be null
+ * {@return the size of a SimpleString which could be {@code null}}
*
* @param str the SimpleString to check
- * @return the size
*/
public static int sizeofNullableString(final SimpleString str) {
if (str == null) {
@@ -663,8 +645,8 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
}
/**
- * This method performs a similar function to {@link String#getChars(int, int, char[], int)}.
- * This is mainly used by the Parsers on Filters
+ * This method performs a similar function to {@link String#getChars(int, int, char[], int)}. This is mainly used by
+ * the Parsers on Filters
*
* @param srcBegin The srcBegin
* @param srcEnd The srcEnd
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/Persister.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/Persister.java
index e3b870fa73..6eed47d085 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/Persister.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/Persister.java
@@ -20,11 +20,11 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
public interface Persister<T extends Object> {
-
- /** This is to be used to store the protocol-id on Messages.
- * Messages are stored on their bare format.
- * The protocol manager will be responsible to code or decode messages.
- * The caveat here is that the first short-sized bytes need to be this constant. */
+ /**
+ * This is to be used to store the protocol-id on Messages. Messages are stored on their bare format. The protocol
+ * manager will be responsible to code or decode messages. The caveat here is that the first short-sized bytes need
+ * to be this constant.
+ */
byte getID();
int getEncodeSize(T record);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/PersisterIDs.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/PersisterIDs.java
index 57440552cf..483f0ae670 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/PersisterIDs.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/persistence/PersisterIDs.java
@@ -17,13 +17,10 @@
package org.apache.activemq.artemis.core.persistence;
-
-
-/** this is a list for all the persisters
- The sole purpose of this is to make sure these IDs will not be duplicate
- so we know where to find IDs.
-*/
-
+/**
+ * This is a list for all the persisters. The sole purpose of this is to make sure these IDs will not be duplicate so we
+ * know where to find IDs.
+ */
public class PersisterIDs {
public static final int MAX_PERSISTERS = 5;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
index ae7c773381..e0438f8a7a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQScheduledComponent.java
@@ -40,7 +40,9 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
protected ScheduledExecutorService scheduledExecutorService;
private boolean startedOwnScheduler;
- /** initialDelay < 0 would mean no initial delay, use the period instead */
+ /**
+ * initialDelay < 0 would mean no initial delay, use the period instead
+ */
private long initialDelay;
private long period;
private TimeUnit timeUnit;
@@ -52,14 +54,17 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
private AtomicBoolean bookedForRunning;
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
*
- * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on the configured {@code executor}
+ * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on
+ * the configured {@code executor}
* @param executor the {@link Executor} that execute {@link #run()} when triggered
* @param initialDelay the time to delay first execution
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
- * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false} otherwise
+ * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false}
+ * otherwise
*/
public ActiveMQScheduledComponent(ScheduledExecutorService scheduledExecutorService,
Executor executor,
@@ -78,13 +83,16 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
*
- * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on the configured {@code executor}
+ * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on
+ * the configured {@code executor}
* @param initialDelay the time to delay first execution
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
- * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false} otherwise
+ * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false}
+ * otherwise
*/
public ActiveMQScheduledComponent(ScheduledExecutorService scheduledExecutorService,
long initialDelay,
@@ -95,16 +103,18 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
- *
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
* <p>
* The component created will have {@code initialDelay} defaulted to {@code checkPeriod}.
*
- * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on the configured {@code executor}
+ * @param scheduledExecutorService the {@link ScheduledExecutorService} that periodically trigger {@link #run()} on
+ * the configured {@code executor}
* @param executor the {@link Executor} that execute {@link #run()} when triggered
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
- * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false} otherwise
+ * @param onDemand if {@code true} the task won't be scheduled on {@link #start()}, {@code false}
+ * otherwise
*/
public ActiveMQScheduledComponent(ScheduledExecutorService scheduledExecutorService,
Executor executor,
@@ -115,11 +125,12 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
- *
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
* <p>
- * This is useful for cases where we want our own scheduler executor: on {@link #start()} it will create a fresh new single-threaded {@link ScheduledExecutorService}
- * using {@link #getThreadFactory()} and {@link #getThisClassLoader()}, while on {@link #stop()} it will garbage it.
+ * This is useful for cases where we want our own scheduler executor: on {@link #start()} it will create a fresh new
+ * single-threaded {@link ScheduledExecutorService} using {@link #getThreadFactory()} and
+ * {@link #getThisClassLoader()}, while on {@link #stop()} it will garbage it.
*
* @param initialDelay the time to delay first execution
* @param checkPeriod the delay between the termination of one execution and the start of the next
@@ -131,11 +142,12 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
}
/**
- * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured {@code executor}.
+ * It creates a scheduled component that can trigger {@link #run()} with a fixed {@code checkPeriod} on a configured
+ * {@code executor}.
*
* <p>
- * This is useful for cases where we want our own scheduler executor.
- * The component created will have {@code initialDelay} defaulted to {@code checkPeriod}.
+ * This is useful for cases where we want our own scheduler executor. The component created will have
+ * {@code initialDelay} defaulted to {@code checkPeriod}.
*
* @param checkPeriod the delay between the termination of one execution and the start of the next
* @param timeUnit the time unit of the {@code initialDelay} and {@code checkPeriod} parameters
@@ -186,7 +198,7 @@ public abstract class ActiveMQScheduledComponent implements ActiveMQComponent, R
* <li>there is no pending execution request
* </ul>
* <p>
- * When a delay request succeed it schedule a new execution to happen in {@link #getPeriod()}.<br>
+ * When a delay request succeed it schedule a new execution to happen in {@link #getPeriod()}.
*/
public boolean delay() {
final AtomicBoolean booked = this.bookedForRunning;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
index 73c86e2976..4d29a5e4a8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
@@ -39,8 +39,8 @@ import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
/**
- * This will use {@link InetAddress#isReachable(int)} to determine if the network is alive.
- * It will have a set of addresses, and if any address is reached the network will be considered alive.
+ * This will use {@link InetAddress#isReachable(int)} to determine if the network is alive. It will have a set of
+ * addresses, and if any address is reached the network will be considered alive.
*/
public class NetworkHealthCheck extends ActiveMQScheduledComponent {
@@ -306,7 +306,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
}
/**
- * @return true if no checks were done or if one address/url responds; false if all addresses/urls fail
+ * {@return true if no checks were done or if one address/url responds; false if all addresses/urls fail}
*/
public boolean check() {
if (isEmpty()) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
index 88833dec64..af4c2d7c54 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonArray.java
@@ -33,67 +33,71 @@ import java.util.stream.Stream;
* {"name":"sue", "age": 42},
* ]
* </pre>
- *
- *
*/
public interface JsonArray extends JsonValue, List<JsonValue> {
/**
- * @return the JsonObject at the given position
+ * {@return the JsonObject at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to the JsonObject
+ * @throws ClassCastException if the value at the specified position is not assignable to the JsonObject
*/
JsonObject getJsonObject(int index);
/**
- * @return the JsonArray at the given position
+ * {@return the JsonArray at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to the JsonArray
+ * @throws ClassCastException if the value at the specified position is not assignable to the JsonArray
*/
JsonArray getJsonArray(int index);
/**
- * @return the JsonNumber at the given position
+ * {@return the JsonNumber at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to the JsonNumber
+ * @throws ClassCastException if the value at the specified position is not assignable to the JsonNumber
*/
JsonNumber getJsonNumber(int index);
/**
- * @return the JsonString at the given position
+ * {@return the JsonString at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to the JsonString
+ * @throws ClassCastException if the value at the specified position is not assignable to the JsonString
*/
JsonString getJsonString(int index);
/**
- * @return the respective JsonValue at the given position
+ * {@return the respective JsonValue at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to the given slazz
+ * @throws ClassCastException if the value at the specified position is not assignable to the given slazz
*/
<T extends JsonValue> List<T> getValuesAs(Class<T> clazz);
/**
- * Returns a list for the array. The value and the type of the elements
- * in the list is specified by the {@code func} argument.
- * <p>This method can be used to obtain a list of the unwrapped types, such as
- * <pre>{@code
+ * Returns a {@code List} for the array. The value and the type of the elements in the list is specified by the
+ * {@code func} argument.
+ * <p>
+ * This method can be used to obtain a list of the unwrapped types, such as
+ * <pre>
+ * {@code
* List<String> strings = ary1.getValuesAs(JsonString::getString);
* List<Integer> ints = ary2.getValuesAs(JsonNumber::intValue);
- * } </pre>
+ * }
+ * </pre>
* It can also be used to obtain a list of simple projections, such as
- * <pre> {@code
+ * <pre>
+ * {@code
* Lsit<Integer> stringsizes = arr.getValueAs((JsonString v) -> v.getString().length();
- * } </pre>
- * @param <K> The element type (must be a subtype of JsonValue) of this JsonArray.
- * @param <T> The element type of the returned List
+ * }
+ * </pre>
+ *
+ * @param <K> The element type (must be a subtype of JsonValue) of this JsonArray.
+ * @param <T> The element type of the returned List
* @param func The function that maps the elements of this JsonArray to the target elements.
- * @return A List of the specified values and type.
+ * @return A List of the specified values and type
* @throws ClassCastException if the {@code JsonArray} contains a value of wrong type
*/
default <T, K extends JsonValue> List<T> getValuesAs(Function<K, T> func) {
@@ -102,57 +106,58 @@ public interface JsonArray extends JsonValue, List<JsonValue> {
}
/**
- * @return the native String at the given position
+ * {@return the native String at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to a String
+ * @throws ClassCastException if the value at the specified position is not assignable to a String
*/
String getString(int index);
/**
- * @return the native String at the given position or the defaultValue if null
+ * {@return the native String at the given position or the defaultValue if null}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to a String
+ * @throws ClassCastException if the value at the specified position is not assignable to a String
*/
String getString(int index, String defaultValue);
/**
- * @return the native int value at the given position
+ * {@return the native int value at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to an int
- * @throws NullPointerException if an object with the given name doesn't exist
+ * @throws ClassCastException if the value at the specified position is not assignable to an int
+ * @throws NullPointerException if an object with the given name doesn't exist
*/
int getInt(int index);
/**
- * @return the native int value at the given position or the defaultValue if null
+ * {@return the native int value at the given position or the defaultValue if null}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to an int
+ * @throws ClassCastException if the value at the specified position is not assignable to an int
*/
int getInt(int index, int defaultValue);
/**
- * @return the native boolean value at the given position
+ * {@return the native boolean value at the given position}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to a boolean
- * @throws NullPointerException if an object with the given name doesn't exist
+ * @throws ClassCastException if the value at the specified position is not assignable to a boolean
+ * @throws NullPointerException if an object with the given name doesn't exist
*/
boolean getBoolean(int index);
/**
- * @return the native boolean value at the given position or the defaultValue if null
+ * {@return the native boolean value at the given position or the defaultValue if null}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
- * @throws ClassCastException if the value at the specified position is not
- * assignable to a boolean
+ * @throws ClassCastException if the value at the specified position is not assignable to a boolean
*/
boolean getBoolean(int index, boolean defaultValue);
/**
- * @return whether the value at the given position is {@link JsonValue#NULL}.
+ * {@return whether the value at the given position is {@link JsonValue#NULL}}
+ *
* @throws IndexOutOfBoundsException if the index is out of range
*/
boolean isNull(int index);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonNumber.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonNumber.java
index 5713b3257f..22f6ffc155 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonNumber.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonNumber.java
@@ -21,7 +21,7 @@ import java.math.BigInteger;
/**
* JsonValue which represents a number.
- *
+ * <p>
* The decimal point is defined as dot '.'.
*
* @see <a href="https://tools.ietf.org/html/rfc4627">RFC-4627 JSON Specification</a>
@@ -45,9 +45,6 @@ public interface JsonNumber extends JsonValue {
BigDecimal bigDecimalValue();
- /**
- * @since 1.1
- */
default Number numberValue() {
throw new UnsupportedOperationException();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
index b044edd20b..4c150bee77 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObject.java
@@ -30,76 +30,85 @@ import java.util.Map;
* }
* }
* </pre>
- *
- * A JsonObject is always also a Map which uses the attribute names as key mapping
- * to their JsonValues.
+ * <p>
+ * A JsonObject is always also a Map which uses the attribute names as key mapping to their JsonValues.
*/
public interface JsonObject extends JsonValue, Map<String, JsonValue> {
/**
- * @return the JsonArray with the given name or {@code null} if there is no attribute with that name
+ * {@return the JsonArray with the given name or {@code null} if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
JsonArray getJsonArray(String name);
/**
- * @return the JsonObject with the given name or {@code null} if there is no attribute with that name
+ * {@return the JsonObject with the given name or {@code null} if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
JsonObject getJsonObject(String name);
/**
- * @return the JsonNumber with the given name or {@code null} if there is no attribute with that name
+ * {@return the JsonNumber with the given name or {@code null} if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
JsonNumber getJsonNumber(String name);
/**
- * @return the JsonString with the given name or {@code null} if there is no attribute with that name
+ * {@return the JsonString with the given name or {@code null} if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
JsonString getJsonString(String name);
/**
- * @return the native string with the given name or {@code null} if there is no attribute with that name
+ * {@return the native string with the given name or {@code null} if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
String getString(String name);
/**
- * @return the native string with the given name or the default value if there is no attribute with that name
+ * {@return the native string with the given name or the default value if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
String getString(String name, String defaultValue);
/**
- * @return the int with the given name or {@code null} if there is no attribute with that name
- * @throws ClassCastException if the JsonValue cannot be correctly cast
+ * {@return the int with the given name or {@code null} if there is no attribute with that name}
+ *
+ * @throws ClassCastException if the JsonValue cannot be correctly cast
* @throws NullPointerException if an object with the given name doesn't exist
*/
int getInt(String name);
/**
- * @return the int with the given name or the default value if there is no attribute with that name
+ * {@return the int with the given name or the default value if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
int getInt(String name, int defaultValue);
/**
- * @return the boolean with the given name or {@code null} if there is no attribute with that name
- * @throws ClassCastException if the JsonValue cannot be correctly cast
+ * {@return the boolean with the given name or {@code null} if there is no attribute with that name}
+ *
+ * @throws ClassCastException if the JsonValue cannot be correctly cast
* @throws NullPointerException if an object with the given name doesn't exist
*/
boolean getBoolean(String name);
/**
- * @return the boolean with the given name or the default value if there is no attribute with that name
+ * {@return the boolean with the given name or the default value if there is no attribute with that name}
+ *
* @throws ClassCastException if the JsonValue cannot be correctly cast
*/
boolean getBoolean(String name, boolean defaultValue);
/**
- * @return whether the attribute with the given name is {@link JsonValue#NULL}
+ * {@return whether the attribute with the given name is {@link JsonValue#NULL}}
*/
boolean isNull(String name);
}
\ No newline at end of file
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObjectBuilder.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObjectBuilder.java
index fa08e0c95c..c7eaabcd3f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObjectBuilder.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonObjectBuilder.java
@@ -20,125 +20,135 @@ import java.math.BigDecimal;
import java.math.BigInteger;
/**
- * A JsonObjectBuilder can be used to build {@link JsonObject JsonObjects}.
- * Instances are not thread safe.
- *
- * Calling any of those methods with either the {@code name} or {@code value} param as {@code null}
- * will result in a {@code NullPointerException}
+ * A JsonObjectBuilder can be used to build {@link JsonObject JsonObjects}. Instances are not thread safe.
+ * <p>
+ * Calling any of those methods with either the {@code name} or {@code value} param as {@code null} will result in a
+ * {@code NullPointerException}
*/
public interface JsonObjectBuilder {
+
/**
- * Add the given JsonValue value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given JsonValue value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the JsonValue to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonValue value);
/**
- * Add the given String value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given String value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the String value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, String value);
+
JsonObjectBuilder add(String name, String value, JsonValue defaultValue);
/**
- * Add the given BigInteger value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given BigInteger value to the JsonObject to be created. If a value with that name already exists it will
+ * be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the BigInteger value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, BigInteger value);
+
JsonObjectBuilder add(String name, BigInteger value, JsonValue defaultValue);
/**
- * Add the given BigDecimal value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given BigDecimal value to the JsonObject to be created. If a value with that name already exists it will
+ * be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value the BigDecimal value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, BigDecimal value);
+
JsonObjectBuilder add(String name, BigDecimal value, JsonValue defaultValue);
/**
- * Add the given int value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given int value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, int value);
/**
- * Add the given long value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given long value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, long value);
/**
- * Add the given double value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given double value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, double value);
/**
- * Add the given boolean value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Add the given boolean value to the JsonObject to be created. If a value with that name already exists it will be
+ * replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param value to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, boolean value);
/**
- * Add a {@link JsonValue#NULL} value to the JsonObject to be created.
- * If a value with that name already exists it will be replaced by the null value.
+ * Add a {@link JsonValue#NULL} value to the JsonObject to be created. If a value with that name already exists it
+ * will be replaced by the null value.
+ *
* @param name the JSON attribute name
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder addNull(String name);
/**
- * Use the given {@link JsonObjectBuilder} to create a {@link JsonObject} which will be
- * added to the JsonObject to be created by this builder.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Use the given {@link JsonObjectBuilder} to create a {@link JsonObject} which will be added to the JsonObject to be
+ * created by this builder. If a value with that name already exists it will be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param builder for creating the JsonObject to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonObjectBuilder builder);
/**
- * Use the given {@link JsonArrayBuilder} to create a {@link JsonArray} which will be
- * added to the JsonObject to be created by this builder.
- * If a value with that name already exists it will be replaced by the new value.
- * @param name the JSON attribute name
+ * Use the given {@link JsonArrayBuilder} to create a {@link JsonArray} which will be added to the JsonObject to be
+ * created by this builder. If a value with that name already exists it will be replaced by the new value.
+ *
+ * @param name the JSON attribute name
* @param builder for creating the JsonArray to add
* @return the current JsonObjectBuilder
*/
JsonObjectBuilder add(String name, JsonArrayBuilder builder);
/**
- * @return a {@link JsonObject} based on the added values.
+ * {@return a {@link JsonObject} based on the added values}
*/
JsonObject build();
/**
* Add all of the attributes of the given {@link JsonObjectBuilder} to the current one
- *
- * @since 1.1
*/
default JsonObjectBuilder addAll(JsonObjectBuilder builder) {
throw new UnsupportedOperationException();
@@ -146,8 +156,6 @@ public interface JsonObjectBuilder {
/**
* Remove the attribute with the given name from the builder.
- *
- * @since 1.1
*/
default JsonObjectBuilder remove(String name) {
throw new UnsupportedOperationException();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
index a0e54488e3..afa6feba4e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/json/JsonValue.java
@@ -35,7 +35,6 @@ public interface JsonValue {
*/
JsonArray EMPTY_JSON_ARRAY = new JsonArrayImpl(javax.json.JsonValue.EMPTY_JSON_ARRAY);
-
/**
* A constant JsonValue for null values
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
index 1654d482d5..a6daeb4da1 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
@@ -65,7 +65,8 @@ public interface AuditLogger {
}
/**
- * @return a String representing the "caller" in the format "user(role)@remoteAddress" using ThreadLocal values (if set)
+ * {@return a String representing the "caller" in the format "user(role)@remoteAddress" using ThreadLocal values (if
+ * set)}
*/
static String getCaller() {
Subject subject = Subject.getSubject(AccessController.getContext());
@@ -76,9 +77,10 @@ public interface AuditLogger {
}
/**
- * @param subject the Subject to be used instead of the corresponding ThreadLocal Subject
- * @param remoteAddress the remote address to use; if null use the corresponding ThreadLocal remote address (if set)
- * @return a String representing the "caller" in the format "user(role)@remoteAddress"
+ * {@return a {@code String} representing the "caller" in the format "user(role)@remoteAddress"}
+ *
+ * @param subject the Subject to be used instead of the corresponding ThreadLocal Subject
+ * @param remoteAddress the remote address to use; if null use the corresponding ThreadLocal remote address (if set)
*/
static String getCaller(Subject subject, String remoteAddress) {
String user = "anonymous";
@@ -2131,11 +2133,7 @@ public interface AuditLogger {
@LogMessage(id = 601514, value = "User {} is getting preparedTransactionMessageCount property on target resource: {}", level = LogMessage.Level.INFO)
void getPreparedTransactionMessageCount(String user, Object source);
- /*
- * This logger is for message production and consumption and is on the hot path so enabled independently
- *
- * */
- //hot path log using a different logger
+ // This logger is for message production and consumption and is on the hot path so enabled independently
static void coreSendMessage(Subject user, String remoteAddress, String messageToString, Object context, String tx) {
MESSAGE_LOGGER.coreSendMessage(getCaller(user, remoteAddress), messageToString, context, tx);
}
@@ -2159,10 +2157,7 @@ public interface AuditLogger {
@LogMessage(id = 601502, value = "User {} acknowledged message from {}: {}, transaction: {}", level = LogMessage.Level.INFO)
void coreAcknowledgeMessage(String user, String queue, String message, String tx);
- /*
- * This logger is focused on user interaction from the console or thru resource specific functions in the management layer/JMX
- * */
-
+ // This logger is focused on user interaction from the console or thru resource specific functions in the management layer/JMX
static void createAddressSuccess(String name, String routingTypes) {
RESOURCE_LOGGER.createAddressSuccess(getCaller(), name, routingTypes);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
index 162f806714..5be6902aba 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractByteBufPool.java
@@ -23,9 +23,9 @@ import io.netty.util.internal.PlatformDependent;
/**
* Thread-safe {@code <T>} interner.
* <p>
- * Differently from {@link String#intern()} it contains a fixed amount of entries and
- * when used by concurrent threads it doesn't ensure the uniqueness of the entries ie
- * the same entry could be allocated multiple times by concurrent calls.
+ * Differently from {@link String#intern()} it contains a fixed amount of entries and when used by concurrent threads it
+ * doesn't ensure the uniqueness of the entries ie the same entry could be allocated multiple times by concurrent
+ * calls.
*/
public abstract class AbstractByteBufPool<T> {
@@ -47,8 +47,8 @@ public abstract class AbstractByteBufPool<T> {
}
/**
- * Batch hash code implementation that works at its best if {@code bytes}
- * contains a {@link org.apache.activemq.artemis.api.core.SimpleString} encoded.
+ * Batch hash code implementation that works at its best if {@code bytes} contains a
+ * {@link org.apache.activemq.artemis.api.core.SimpleString} encoded.
*/
private static int hashCode(final ByteBuf bytes, final int offset, final int length) {
if (PlatformDependent.isUnaligned() && PlatformDependent.hasUnsafe()) {
@@ -110,8 +110,8 @@ public abstract class AbstractByteBufPool<T> {
}
/**
- * Returns {@code true} if {@code length}'s {@code byteBuf} content from {@link ByteBuf#readerIndex()} can be pooled,
- * {@code false} otherwise.
+ * {@return {@code true} if {@code length}'s {@code byteBuf} content from {@link ByteBuf#readerIndex()} can be
+ * pooled, {@code false} otherwise}
*/
protected abstract boolean canPool(ByteBuf byteBuf, int length);
@@ -121,8 +121,8 @@ public abstract class AbstractByteBufPool<T> {
protected abstract T create(ByteBuf byteBuf, int length);
/**
- * Returns {@code true} if the {@code entry} content is the same of {@code byteBuf} at the specified {@code offset}
- * and {@code length} {@code false} otherwise.
+ * {@return {@code true} if the {@code entry} content is the same of {@code byteBuf} at the specified {@code offset}
+ * and {@code length} {@code false} otherwise}
*/
protected abstract boolean isEqual(T entry, ByteBuf byteBuf, int offset, int length);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractPool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractPool.java
index 666f4abb5d..5978031dfb 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractPool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AbstractPool.java
@@ -22,9 +22,9 @@ import io.netty.util.internal.MathUtil;
/**
* Thread-safe {@code <T>} interner.
* <p>
- * Differently from {@link String#intern()} it contains a fixed amount of entries and
- * when used by concurrent threads it doesn't ensure the uniqueness of the entries ie
- * the same entry could be allocated multiple times by concurrent calls.
+ * Differently from {@link String#intern()} it contains a fixed amount of entries and when used by concurrent threads it
+ * doesn't ensure the uniqueness of the entries ie the same entry could be allocated multiple times by concurrent
+ * calls.
*/
public abstract class AbstractPool<I, O> {
@@ -51,7 +51,7 @@ public abstract class AbstractPool<I, O> {
protected abstract O create(I value);
/**
- * Returns {@code true} if the {@code entry} content is equal to {@code value};
+ * {@return {@code true} if the {@code entry} content is equal to {@code value};}
*/
protected abstract boolean isEqual(O entry, I value);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
index b9c3c28342..6edeaf5348 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java
@@ -42,8 +42,8 @@ public final class ActiveMQThreadFactory implements ThreadFactory {
private final String prefix;
/**
- * Construct a new instance. The access control context of the calling thread will be the one used to create
- * new threads if a security manager is installed.
+ * Construct a new instance. The access control context of the calling thread will be the one used to create new
+ * threads if a security manager is installed.
*
* @param groupName the name of the thread group to assign threads to by default
* @param daemon whether the created threads should be daemon threads
@@ -54,8 +54,8 @@ public final class ActiveMQThreadFactory implements ThreadFactory {
}
/**
- * Construct a new instance. The access control context of the calling thread will be the one used to create
- * new threads if a security manager is installed.
+ * Construct a new instance. The access control context of the calling thread will be the one used to create new
+ * threads if a security manager is installed.
*
* @param groupName the name of the thread group to assign threads to by default
* @param daemon whether the created threads should be daemon threads
@@ -99,7 +99,9 @@ public final class ActiveMQThreadFactory implements ThreadFactory {
}
}
- /** It will wait all threads to finish */
+ /**
+ * It will wait all threads to finish
+ */
public boolean join(int timeout, TimeUnit timeUnit) {
try {
return active.await(timeout, timeUnit);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
index c6d3830ab2..f21921ce4c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ArtemisCloseable.java
@@ -18,7 +18,9 @@ package org.apache.activemq.artemis.utils;
public interface ArtemisCloseable extends AutoCloseable {
- /** The main purpose of this interface is to hide the exception since it is not needed. */
+ /**
+ * The main purpose of this interface is to hide the exception since it is not needed.
+ */
@Override
void close();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
index 36e5f8522c..66d95f7b85 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/AutomaticLatch.java
@@ -16,11 +16,11 @@
*/
package org.apache.activemq.artemis.utils;
-/** An automatic latch has the same semantic as the ReusableLatch
- * However this class has a replaceable callback that could be called
- * when the number of elements reach zero.
- * With that you can either block to wait completion, or to send a callback to be
- * used when it reaches 0. */
+/**
+ * An automatic latch has the same semantic as the ReusableLatch However this class has a replaceable callback that
+ * could be called when the number of elements reach zero. With that you can either block to wait completion, or to send
+ * a callback to be used when it reaches 0.
+ */
public class AutomaticLatch extends AbstractLatch {
volatile Runnable afterCompletion;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
index 0472598e73..53aace6c86 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ByteUtil.java
@@ -120,7 +120,9 @@ public class ByteUtil {
return new String(hexChars);
}
- /** Simplify reading of a byte array in a programmers understable way */
+ /**
+ * Simplify reading of a byte array in a programmers understable way
+ */
public static String debugByteArray(byte[] byteArray) {
StringWriter builder = new StringWriter();
PrintWriter writer = new PrintWriter(builder);
@@ -390,7 +392,8 @@ public class ByteUtil {
}
/**
- * This ensure a more exact resizing then {@link ByteBuf#ensureWritable(int)}, if needed.<br>
+ * This ensure a more exact resizing then {@link ByteBuf#ensureWritable(int)}, if needed.
+ * <p>
* It won't try to trim a large enough buffer.
*/
public static void ensureExactWritable(ByteBuf buffer, int minWritableBytes) {
@@ -399,13 +402,12 @@ public class ByteUtil {
}
}
-
/**
- * Returns {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s},
+ * {@return {@code true} if the {@link SimpleString} encoded content into {@code bytes} is equals to {@code s}
* {@code false} otherwise.
* <p>
- * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie starting right after the
- * length field.
+ * It assumes that the {@code bytes} content is read using {@link SimpleString#readSimpleString(ByteBuf, int)} ie
+ * starting right after the length field.}
*/
public static boolean equals(final byte[] bytes, final ByteBuf byteBuf, final int offset, final int length) {
if (bytes.length != length)
@@ -479,7 +481,8 @@ public class ByteUtil {
/**
* It zeroes {@code bytes} of the given {@code buffer}, starting (inclusive) from {@code offset}.
*
- * @throws IndexOutOfBoundsException if {@code offset + bytes > }{@link ByteBuffer#capacity()} or {@code offset >= }{@link ByteBuffer#capacity()}
+ * @throws IndexOutOfBoundsException if {@code offset + bytes > }{@link ByteBuffer#capacity()} or
+ * {@code offset >= }{@link ByteBuffer#capacity()}
* @throws IllegalArgumentException if {@code offset} or {@code capacity} are less then 0
* @throws ReadOnlyBufferException if {@code buffer} is read-only
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
index 2a4019947f..14769a6204 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ClassloadingUtil.java
@@ -25,12 +25,11 @@ import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
/**
- * This class will be used to perform generic class-loader operations,
- * such as load a class first using TCCL, and then the classLoader used by ActiveMQ Artemis (ClassloadingUtil.getClass().getClassLoader()).
+ * This class will be used to perform generic class-loader operations, such as load a class first using TCCL, and then
+ * the classLoader used by ActiveMQ Artemis (ClassloadingUtil.getClass().getClassLoader()).
* <p>
* Is't required to use a Security Block on any calls to this class.
*/
-
public final class ClassloadingUtil {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
index db2b86fc0d..bddc29f500 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentUtil.java
@@ -24,8 +24,9 @@ public class ConcurrentUtil {
/**
* Await for condition, handling
* <a href="http://errorprone.info/bugpattern/WaitNotInLoop">spurious wakeups</a>.
+ *
* @param condition condition to await for
- * @param timeout the maximum time to wait in milliseconds
+ * @param timeout the maximum time to wait in milliseconds
* @return value from {@link Condition#await(long, TimeUnit)}
*/
public static boolean await(final Condition condition, final long timeout) throws InterruptedException {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
index bb25d3347a..9a1d32e065 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java
@@ -39,15 +39,12 @@ import java.lang.invoke.MethodHandles;
/**
* A DefaultSensitiveDataCodec
- *
- * The default implementation of SensitiveDataCodec.
- * This class is used when the user indicates in the config
- * file to use a masked password but doesn't give a
- * codec implementation.
- *
- * It supports one-way hash (digest) and two-way (encrypt-decrpt) algorithms
- * The two-way uses "Blowfish" algorithm
- * The one-way uses "PBKDF2" hash algorithm
+ * <p>
+ * The default implementation of SensitiveDataCodec. This class is used when the user indicates in the config file to
+ * use a masked password but doesn't give a codec implementation.
+ * <p>
+ * It supports one-way hash (digest) and two-way (encrypt-decrpt) algorithms The two-way uses "Blowfish" algorithm The
+ * one-way uses "PBKDF2" hash algorithm
*/
public class DefaultSensitiveStringCodec implements SensitiveDataCodec<String> {
@@ -94,10 +91,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec<String> {
}
/**
- * This main class is as documented on configuration-index.md, where the user can mask the password here. *
- *
- * @param args
- * @throws Exception
+ * This main class is as documented on configuration-index.md, where the user can mask the password here.
*/
public static void main(String[] args) throws Exception {
if (args.length != 1) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
index df9d24d443..e78f43b901 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Env.java
@@ -20,8 +20,8 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
/**
- * Utility that detects various properties specific to the current runtime
- * environment, such as JVM bitness and OS type.
+ * Utility that detects various properties specific to the current runtime environment, such as JVM bitness and OS
+ * type.
*/
public final class Env {
@@ -51,10 +51,9 @@ public final class Env {
}
/**
- * The system will change a few logs and semantics to be suitable to
- * run a long testsuite.
- * Like a few log entries that are only valid during a production system.
- * or a few cases we need to know as warn on the testsuite and as log in production.
+ * The system will change a few logs and semantics to be suitable to run a long testsuite. Like a few log entries
+ * that are only valid during a production system. or a few cases we need to know as warn on the testsuite and as log
+ * in production.
*/
private static boolean testEnv = false;
@@ -68,8 +67,7 @@ public final class Env {
}
/**
- * Return the size in bytes of a OS memory page.
- * This value will always be a power of two.
+ * Return the size in bytes of a OS memory page. This value will always be a power of two.
*/
public static int osPageSize() {
return OS_PAGE_SIZE;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java
index 619a937a15..2373d5748f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java
@@ -27,18 +27,19 @@ import java.util.concurrent.ConcurrentMap;
public class FactoryFinder {
/**
- * The strategy that the FactoryFinder uses to find load and instantiate Objects
- * can be changed out by calling the setObjectFactory method with a custom implementation of ObjectFactory.
- *
- * The default ObjectFactory is typically changed out when running in a specialized container
- * environment where service discovery needs to be done via the container system. For example,
- * in an OSGi scenario.
+ * The strategy that the FactoryFinder uses to find load and instantiate Objects can be changed out by calling the
+ * setObjectFactory method with a custom implementation of ObjectFactory.
+ * <p>
+ * The default ObjectFactory is typically changed out when running in a specialized container environment where
+ * service discovery needs to be done via the container system. For example, in an OSGi scenario.
*/
public interface ObjectFactory {
/**
+ * Creates an {@code Object} based on the input
+ *
* @param path the full service path
- * @return Object
+ * @return {@code Object}
* @throws IllegalAccessException illegal access
* @throws InstantiationException on instantiation error
* @throws IOException On IO Error
@@ -139,8 +140,7 @@ public class FactoryFinder {
/**
* Creates a new instance of the given key
*
- * @param key is the key to add to the path to find a text file containing
- * the factory name
+ * @param key is the key to add to the path to find a text file containing the factory name
* @return a newly created instance
* @throws IllegalAccessException On illegal access
* @throws InstantiationException On can not instantiate exception
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
index 68333f24fd..d01bb705d2 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java
@@ -108,15 +108,13 @@ public class FileUtil {
});
}
-
/**
* Search and replace strings on a file
*
- * @param file file to be replaced
- * @param find string expected to match
+ * @param file file to be replaced
+ * @param find string expected to match
* @param replace string to be replaced
* @return true if the replacement was successful
- * @throws Exception
*/
public static boolean findReplace(File file, String find, String replace) throws Exception {
if (!file.exists()) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
index 0b44132296..5aadf12949 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/HashProcessor.java
@@ -24,18 +24,18 @@ public interface HashProcessor {
/**
* produce hash text from plain text
+ *
* @param plainText Plain text input
* @return the Hash value of the input plain text
- * @throws Exception
*/
String hash(String plainText) throws Exception;
/**
* compare the plain char array against the hash value
+ *
* @param inputValue value of the plain text
* @param storedHash the existing hash value
- * @return true if the char array matches the hash value,
- * otherwise false.
+ * @return true if the char array matches the hash value, otherwise false.
*/
boolean compare(char[] inputValue, String storedHash);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
index 22535c693c..8dffd1466a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/IPV6Util.java
@@ -26,7 +26,8 @@ public class IPV6Util {
if (host != null && host.contains(":")) {
String hostToCheck = host;
- /* strip off zone index since com.google.common.net.InetAddresses.isInetAddress() doesn't support it
+ /*
+ * strip off zone index since com.google.common.net.InetAddresses.isInetAddress() doesn't support it
* see https://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices for more info
*/
if (host.contains("%")) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
index ab0490a214..6ff1f04129 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/JsonLoader.java
@@ -30,8 +30,8 @@ import javax.json.spi.JsonProvider;
import java.io.Reader;
/**
- * This is to make sure we use the proper classLoader to load JSon libraries.
- * This is equivalent to using {@link javax.json.Json}
+ * This is to make sure we use the proper classLoader to load JSon libraries. This is equivalent to using
+ * {@link javax.json.Json}
*/
public class JsonLoader {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
index ed668f97d2..42f752875c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
@@ -38,11 +38,11 @@ public final class PasswordMaskingUtil {
/**
* This method deals with password masking and returns the password in its plain text form.
- * @param password : the original value of password string; interpreted as masked if wrapped in ENC()
- * or as plain text otherwise.
- * @param codecClass : the codec used to decode the password. Only when the password is interpreted
- * as masked will this codec be used. Ignored otherwise.
- * @return
+ *
+ * @param password : the original value of password string; interpreted as masked if wrapped in ENC() or as plain
+ * text otherwise.
+ * @param codecClass : the codec used to decode the password. Only when the password is interpreted as masked will
+ * this codec be used. Ignored otherwise.
*/
public static String resolveMask(String password, String codecClass) throws Exception {
return resolveMask(null, password, codecClass);
@@ -50,14 +50,13 @@ public final class PasswordMaskingUtil {
/**
* This method deals with password masking and returns the password in its plain text form.
- * @param maskPassword : explicit mask flag. If it's true, the password is interpreted as
- * masked. If it is false, the password is interpreted as plain text.
- * if it is null, the password will be interpreted as masked if the
- * password is wrapped in ENC(), or as plain text otherwise.
- * @param password : the original value of password string
- * @param codecClass : the codec used to decode the password. Only when the password is interpreted
- * as masked will this codec be used. Ignored otherwise.
- * @return
+ *
+ * @param maskPassword : explicit mask flag. If it's true, the password is interpreted as masked. If it is false, the
+ * password is interpreted as plain text. if it is null, the password will be interpreted as
+ * masked if the password is wrapped in ENC(), or as plain text otherwise.
+ * @param password : the original value of password string
+ * @param codecClass : the codec used to decode the password. Only when the password is interpreted as masked will
+ * this codec be used. Ignored otherwise.
*/
public static String resolveMask(Boolean maskPassword, String password, String codecClass) throws Exception {
String plainText = password;
@@ -155,14 +154,12 @@ public final class PasswordMaskingUtil {
return processor;
}
- /*
+ /**
* Loading the codec class.
*
* @param codecDesc This parameter must have the following format:
- *
- * <full qualified class name>;key=value;key1=value1;...
- *
- * Where only <full qualified class name> is required. key/value pairs are optional
+ * {@code <full qualified class name>;key=value;key1=value1;...} where only
+ * {@code <full qualified class name>} is required. key/value pairs are optional
*/
public static SensitiveDataCodec<String> getCodec(String codecDesc) throws ActiveMQException {
SensitiveDataCodec<String> codecInstance;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PendingTask.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PendingTask.java
index 4a42aba3ca..7aed97f1c6 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PendingTask.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PendingTask.java
@@ -17,9 +17,8 @@
package org.apache.activemq.artemis.utils;
/**
- * This is similar to a Runnable, except that we throw exceptions.
- * In certain places we need to complete tasks after deliveries,
- * and this will take care of those situations.
+ * This is similar to a Runnable, except that we throw exceptions. In certain places we need to complete tasks after
+ * deliveries, and this will take care of those situations.
*/
public abstract class PendingTask {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PowerOf2Util.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PowerOf2Util.java
index fd60402759..2863d9e7d5 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PowerOf2Util.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PowerOf2Util.java
@@ -25,9 +25,11 @@ public final class PowerOf2Util {
}
/**
- * Fast alignment operation with power of 2 {@code alignment} and {@code value >=0} and {@code value <}{@link Integer#MAX_VALUE}.<br>
- * In order to be fast is up to the caller to check arguments correctness.
- * Original algorithm is on https://en.wikipedia.org/wiki/Data_structure_alignment.
+ * Fast alignment operation with power of 2 {@code alignment} and {@code value >=0} and
+ * {@code value <}{@link Integer#MAX_VALUE}.
+ * <p>
+ * In order to be fast is up to the caller to check arguments correctness. Original algorithm is on
+ * https://en.wikipedia.org/wiki/Data_structure_alignment.
*/
public static int align(final int value, final int pow2alignment) {
return (value + (pow2alignment - 1)) & ~(pow2alignment - 1);
@@ -37,7 +39,7 @@ public final class PowerOf2Util {
* Is a value a positive power of two.
*
* @param value to be checked.
- * @return true if the number is a positive power of two otherwise false.
+ * @return true if the number is a positive power of two otherwise false
*/
public static boolean isPowOf2(final int value) {
return Integer.bitCount(value) == 1;
@@ -48,7 +50,7 @@ public final class PowerOf2Util {
*
* @param value to be tested.
* @param pow2alignment boundary the address is tested against.
- * @return true if the address is on the aligned boundary otherwise false.
+ * @return true if the address is on the aligned boundary otherwise false
* @throws IllegalArgumentException if the alignment is not a power of 2
*/
public static boolean isAligned(final long value, final int pow2alignment) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
index 02d4fc55a1..5252133fe5 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Preconditions.java
@@ -31,12 +31,13 @@ public class Preconditions {
}
return reference;
}
+
/**
* Ensures the truth of an expression involving one or more parameters to the calling method.
*
- * @param expression a boolean expression
- * @param errorMessage the exception message to use if the check fails; will be converted to a
- * string using {@link String#valueOf(Object)}
+ * @param expression a boolean expression
+ * @param errorMessage the exception message to use if the check fails; will be converted to a string using
+ * {@link String#valueOf(Object)}
* @throws IllegalArgumentException if {@code expression} is false
*/
public static void checkArgument(boolean expression, Object errorMessage) {
@@ -48,17 +49,17 @@ public class Preconditions {
/**
* Ensures the truth of an expression involving one or more parameters to the calling method.
*
- * @param expression a boolean expression
- * @param errorMessageTemplate a template for the exception message should the check fail. The
- * message is formed by replacing each {@code %s} placeholder in the template with an
- * argument. These are matched by position - the first {@code %s} gets {@code
- * errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted message
- * in square braces. Unmatched placeholders will be left as-is.
- * @param errorMessageArgs the arguments to be substituted into the message template. Arguments
- * are converted to strings using {@link String#valueOf(Object)}.
+ * @param expression a boolean expression
+ * @param errorMessageTemplate a template for the exception message should the check fail. The message is formed by
+ * replacing each {@code %s} placeholder in the template with an argument. These are
+ * matched by position - the first {@code %s} gets {@code errorMessageArgs[0]}, etc.
+ * Unmatched arguments will be appended to the formatted message in square braces.
+ * Unmatched placeholders will be left as-is.
+ * @param errorMessageArgs the arguments to be substituted into the message template. Arguments are converted to
+ * strings using {@link String#valueOf(Object)}.
* @throws IllegalArgumentException if {@code expression} is false
- * @throws NullPointerException if the check fails and either {@code errorMessageTemplate} or
- * {@code errorMessageArgs} is null (don't let this happen)
+ * @throws NullPointerException if the check fails and either {@code errorMessageTemplate} or
+ * {@code errorMessageArgs} is null (don't let this happen)
*/
public static void checkArgument(
boolean expression,
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/RandomUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/RandomUtil.java
index 03a928f29b..8e88389213 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/RandomUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/RandomUtil.java
@@ -47,6 +47,7 @@ public class RandomUtil {
* <li>ABCDEFGHIJKLMNOPQRSTUVWXYZ</li>
* <li>0123456789</li>
* </ul>
+ *
* @param length how long the returned {@code String} should be
* @return a {@code String} of random alpha-numeric characters
*/
@@ -59,14 +60,14 @@ public class RandomUtil {
}
/**
- * @return A randomly generated {@link java.util.UUID} converted to a {@code String}
+ * {@return A randomly generated {@link java.util.UUID} converted to a {@code String}}
*/
public static String randomUUIDString() {
return java.util.UUID.randomUUID().toString();
}
/**
- * @return A randomly generated {@link java.util.UUID} converted to a {@link SimpleString}
+ * {@return A randomly generated {@link java.util.UUID} converted to a {@link SimpleString}}
*/
public static SimpleString randomUUIDSimpleString() {
return SimpleString.of(RandomUtil.randomUUIDString());
@@ -79,6 +80,7 @@ public class RandomUtil {
* <li>ABCDEFGHIJKLMNOPQRSTUVWXYZ</li>
* <li>0123456789</li>
* </ul>
+ *
* @return A randomly generated alpha-numeric {@code char}
*/
public static char randomChar() {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounter.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounter.java
index 423b6b4fcf..b9adeb99f7 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounter.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounter.java
@@ -30,9 +30,9 @@ public interface ReferenceCounter {
Runnable getTask();
/**
- * Some asynchronous operations (like ack) may delay certain conditions.
- * After met, during afterCompletion we may need to recheck certain values
- * to make sure we won't get into a situation where the condition was met asynchronously and queues not removed.
+ * Some asynchronous operations (like ack) may delay certain conditions. After met, during afterCompletion we may
+ * need to recheck certain values to make sure we won't get into a situation where the condition was met
+ * asynchronously and queues not removed.
*/
void check();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounterUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounterUtil.java
index 89494d7f33..f739186ddc 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounterUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReferenceCounterUtil.java
@@ -76,7 +76,9 @@ public class ReferenceCounterUtil implements ReferenceCounter, AutoCloseable {
return value;
}
- /** it will set the value all the way to 0, and execute the task meant for when the value was 0. */
+ /**
+ * it will set the value all the way to 0, and execute the task meant for when the value was 0.
+ */
public void exhaust() {
execute();
useUpdater.set(this, 0);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReusableLatch.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReusableLatch.java
index 4b28b63be4..8d8414d9eb 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReusableLatch.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ReusableLatch.java
@@ -17,18 +17,23 @@
package org.apache.activemq.artemis.utils;
/**
- * <p>This class will use the framework provided to by AbstractQueuedSynchronizer.</p>
- * <p>AbstractQueuedSynchronizer is the framework for any sort of concurrent synchronization, such as Semaphores, events, etc, based on AtomicIntegers.</p>
- *
- * <p>This class works just like CountDownLatch, with the difference you can also increase the counter</p>
- *
- * <p>It could be used for sync points when one process is feeding the latch while another will wait when everything is done. (e.g. waiting IO completions to finish)</p>
- *
- * <p>On ActiveMQ Artemis we have the requirement of increment and decrement a counter until the user fires a ready event (commit). At that point we just act as a regular countDown.</p>
- *
- * <p>Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.</p>
- *
- * <p>For example: prepareTransaction will wait for the current completions, and further adds will be called on the latch. Later on when commit is called you can reuse the same latch.</p>
+ * This class will use the framework provided to by AbstractQueuedSynchronizer.
+ * <p>
+ * AbstractQueuedSynchronizer is the framework for any sort of concurrent synchronization, such as Semaphores, events,
+ * etc, based on AtomicIntegers.
+ * <p>
+ * This class works just like CountDownLatch, with the difference you can also increase the counter
+ * <p>
+ * It could be used for sync points when one process is feeding the latch while another will wait when everything is
+ * done. (e.g. waiting IO completions to finish)
+ * <p>
+ * On ActiveMQ Artemis we have the requirement of increment and decrement a counter until the user fires a ready event
+ * (commit). At that point we just act as a regular countDown.
+ * <p>
+ * Note: This latch is reusable. Once it reaches zero, you can call up again, and reuse it on further waits.
+ * <p>
+ * For example: prepareTransaction will wait for the current completions, and further adds will be called on the latch.
+ * Later on when commit is called you can reuse the same latch.
*/
public class ReusableLatch extends AbstractLatch {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
index 65a7ab2c46..e8c6947807 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SelectorTranslator.java
@@ -21,15 +21,15 @@ import java.util.List;
/**
* This class converts a JMS selector expression into an ActiveMQ Artemis core filter expression.
- *
+ * <p>
* JMS selector and ActiveMQ Artemis filters use the same syntax but have different identifiers.
- *
- * We basically just need to replace the JMS header and property Identifier names
- * with the corresponding ActiveMQ Artemis field and header Identifier names.
- *
- * We must be careful not to substitute any literals, or identifiers whose name contains the name
- * of one we want to substitute.
- *
+ * <p>
+ * We basically just need to replace the JMS header and property Identifier names with the corresponding ActiveMQ
+ * Artemis field and header Identifier names.
+ * <p>
+ * We must be careful not to substitute any literals, or identifiers whose name contains the name of one we want to
+ * substitute.
+ * <p>
* This makes it less trivial than a simple search and replace.
*/
public class SelectorTranslator {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
index 015af65c0f..46d6772051 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SensitiveDataCodec.java
@@ -20,9 +20,9 @@ import java.util.Map;
/**
* A SensitiveDataCodec
- *
+ * <p>
* This interface is used for implementing a value decoder.
- *
+ * <p>
* It takes in a mask value and decode it.
*/
public interface SensitiveDataCodec<T> {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
index e1b7bf3a45..1b2c6fd238 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SizeAwareMetric.java
@@ -56,7 +56,9 @@ public class SizeAwareMetric {
private Runnable underCallback;
- /** To be used in a case where we just measure elements */
+ /**
+ * To be used in a case where we just measure elements
+ */
public SizeAwareMetric() {
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
index da1e8b9a09..c0781c24c5 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/SpawnedVMSupport.java
@@ -154,20 +154,9 @@ public class SpawnedVMSupport {
}
/**
- * @param classPath
- * @param wordMatch
- * @param wordRunning
- * @param className
- * @param memoryArg1
- * @param memoryArg2
- * @param vmargs
- * @param logOutput
- * @param logErrorOutput
- * @param debugPort if <=0 it means no debug
- * @param args
- * @return
- * @throws IOException
- * @throws ClassNotFoundException
+ * Spawns a VM
+ *
+ * @param debugPort if <=0 it means no debug {@return a {@code Process} based on the input parameters}
*/
public static Process spawnVM(String classPath,
String wordMatch,
@@ -238,16 +227,13 @@ public class SpawnedVMSupport {
Process process) throws ClassNotFoundException {
SpawnedVMSupport.startLogger(logOutput, wordMatch, wordRunning, className, process);
- // Adding a reader to System.err, so the VM won't hang on a System.err.println as identified on this forum thread:
- // http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151815
+ // Adding a reader to System.err, so the VM won't hang on a System.err.println
ProcessLogger errorLogger = new ProcessLogger(logErrorOutput, process.getErrorStream(), className, wordMatch, wordRunning);
errorLogger.start();
}
/**
* it will return a pair of dead / alive servers
- *
- * @return
*/
private static Set<Process> getAliveProcesses() {
@@ -315,11 +301,6 @@ public class SpawnedVMSupport {
return true;
}
- /**
- * @param className
- * @param process
- * @throws ClassNotFoundException
- */
public static void startLogger(final boolean print,
final String wordMatch,
final Runnable wordRunanble,
@@ -329,11 +310,6 @@ public class SpawnedVMSupport {
outputLogger.start();
}
- /**
- * @param className
- * @param process
- * @throws ClassNotFoundException
- */
public static void startLogger(final String className, final Process process) throws ClassNotFoundException {
startLogger(true, null, null, className, process);
}
@@ -351,8 +327,7 @@ public class SpawnedVMSupport {
private final String wordMatch;
/**
- * This will be executed when wordMatch is within any line on the log *
- * *
+ * This will be executed when wordMatch is within any line on the log
*/
private final Runnable wordRunner;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/StringEscapeUtils.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/StringEscapeUtils.java
index db18e30f75..65f72d649e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/StringEscapeUtils.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/StringEscapeUtils.java
@@ -24,8 +24,7 @@ public abstract class StringEscapeUtils {
/**
* Adapted from commons lang StringEscapeUtils, escapes a string
*
- * @param str
- * @return an escaped version of the input string.
+ * @return an escaped version of the input string
*/
public static String escapeString(String str) {
if (str == null) {
@@ -92,11 +91,11 @@ public abstract class StringEscapeUtils {
}
/**
- * <p>Returns an upper case hexadecimal <code>String</code> for the given
+ * <p>Returns an upper case hexadecimal {@code String} for the given
* character.</p>
*
* @param ch The character to convert.
- * @return An upper case hexadecimal <code>String</code>
+ * @return An upper case hexadecimal {@code String}
*/
private static String hex(char ch) {
return Integer.toHexString(ch).toUpperCase();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
index c184f09727..023f9d7396 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Suppliers.java
@@ -27,18 +27,15 @@ import static org.apache.activemq.artemis.utils.Preconditions.checkNotNull;
public class Suppliers {
/**
- * Returns a supplier which caches the instance retrieved during the first
- * call to {@code get()} and returns that value on subsequent calls to
- * {@code get()}. See:
+ * Returns a supplier which caches the instance retrieved during the first call to {@code get()} and returns that
+ * value on subsequent calls to {@code get()}. See:
* <a href="http://en.wikipedia.org/wiki/Memoization">memoization</a>
- *
- * <p>The returned supplier is thread-safe. The delegate's {@code get()}
- * method will be invoked at most once. The supplier's serialized form does
- * not contain the cached value, which will be recalculated when {@code get()}
- * is called on the reserialized instance.
- *
- * <p>If {@code delegate} is an instance created by an earlier call to {@code
- * memoize}, it is returned directly.
+ * <p>
+ * The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at most once. The
+ * supplier's serialized form does not contain the cached value, which will be recalculated when {@code get()} is
+ * called on the reserialized instance.
+ * <p>
+ * If {@code delegate} is an instance created by an earlier call to {@code memoize}, it is returned directly.
*/
public static <T> Supplier<T> memoize(Supplier<T> delegate) {
return (delegate instanceof MemoizingSupplier)
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
index c9c5a55a20..1197fbba1e 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
@@ -22,9 +22,6 @@ import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.Locale;
-/**
- * Time utils.
- */
public final class TimeUtils {
private TimeUtils() {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
index b6cb93e047..9a11f542ab 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UTF8Util.java
@@ -29,7 +29,7 @@ import java.lang.invoke.MethodHandles;
/**
* A UTF8Util
- *
+ * <p>
* This class will write UTFs directly to the ByteOutput (through the MessageBuffer interface)
*/
public final class UTF8Util {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
index 716267a946..187785972f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUID.java
@@ -17,29 +17,23 @@
package org.apache.activemq.artemis.utils;
/**
- * UUID represents Universally Unique Identifiers (aka Global UID in Windows
- * world). UUIDs are usually generated via UUIDGenerator (or in case of 'Null
- * UUID', 16 zero bytes, via static method getNullUUID()), or received from
- * external systems.
+ * UUID represents Universally Unique Identifiers (aka Global UID in Windows world). UUIDs are usually generated via
+ * UUIDGenerator (or in case of 'Null UUID', 16 zero bytes, via static method getNullUUID()), or received from external
+ * systems.
* <p>
- * By default class caches the string presentations of UUIDs so that description
- * is only created the first time it's needed. For memory stingy applications
- * this caching can be turned off (note though that if uuid.toString() is never
- * called, desc is never calculated so only loss is the space allocated for the
- * desc pointer... which can of course be commented out to save memory).
+ * By default class caches the string presentations of UUIDs so that description is only created the first time it's
+ * needed. For memory stingy applications this caching can be turned off (note though that if uuid.toString() is never
+ * called, desc is never calculated so only loss is the space allocated for the desc pointer... which can of course be
+ * commented out to save memory).
* <p>
- * Similarly, hash code is calculated when it's needed for the first time, and
- * from thereon that value is just returned. This means that using UUIDs as keys
- * should be reasonably efficient.
+ * Similarly, hash code is calculated when it's needed for the first time, and from thereon that value is just returned.
+ * This means that using UUIDs as keys should be reasonably efficient.
* <p>
- * UUIDs can be compared for equality, serialized, cloned and even sorted.
- * Equality is a simple bit-wise comparison. Ordering (for sorting) is done by
- * first ordering based on type (in the order of numeric values of types),
- * secondarily by time stamp (only for time-based time stamps), and finally by
- * straight numeric byte-by-byte comparison (from most to least significant
- * bytes).
+ * UUIDs can be compared for equality, serialized, cloned and even sorted. Equality is a simple bit-wise comparison.
+ * Ordering (for sorting) is done by first ordering based on type (in the order of numeric values of types), secondarily
+ * by time stamp (only for time-based time stamps), and finally by straight numeric byte-by-byte comparison (from most
+ * to least significant bytes).
*/
-
public final class UUID {
private static final String kHexChars = "0123456789abcdefABCDEF";
@@ -67,9 +61,7 @@ public final class UUID {
public static final byte TYPE_RANDOM_BASED = 4;
- /*
- * 'Standard' namespaces defined (suggested) by UUID specs:
- */
+ // 'Standard' namespaces defined (suggested) by UUID specs:
public static final String NAMESPACE_DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
public static final String NAMESPACE_URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
@@ -113,7 +105,9 @@ public final class UUID {
mId = data;
}
- /** This is for conversions between two types of UUID */
+ /**
+ * This is for conversions between two types of UUID
+ */
public UUID(java.util.UUID uuid) {
this(ByteUtil.doubleLongToBytes(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()));
}
@@ -123,16 +117,13 @@ public final class UUID {
}
/**
- * Could use just the default hash code, but we can probably create a better
- * identity hash (ie. same contents generate same hash) manually, without
- * sacrificing speed too much. Although multiplications with modulos would
+ * Could use just the default hash code, but we can probably create a better identity hash (ie. same contents
+ * generate same hash) manually, without sacrificing speed too much. Although multiplications with modulos would
* generate better hashing, let's use just shifts, and do 2 bytes at a time.
- * <br>
- * Of course, assuming UUIDs are randomized enough, even simpler approach
- * might be good enough?
- * <br>
- * Is this a good hash? ... one of these days I better read more about basic
- * hashing techniques I swear!
+ * <p>
+ * Of course, assuming UUIDs are randomized enough, even simpler approach might be good enough?
+ * <p>
+ * Is this a good hash? ... one of these days I better read more about basic hashing techniques I swear!
*/
private static final int[] kShifts = {3, 7, 17, 21, 29, 4, 9};
@@ -211,8 +202,7 @@ public final class UUID {
* Creates a 128bit number from the String representation of {@link UUID}.
*
* @param uuid The UUID
- * @return byte array that can be used to recreate a UUID instance from the given String
- * representation
+ * @return byte array that can be used to recreate a UUID instance from the given String representation
*/
public static byte[] stringToBytes(String uuid) {
byte[] data = new byte[16];
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
index 6997077146..b6c6f29f72 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java
@@ -71,19 +71,12 @@ public final class UUIDGenerator {
return UUIDGenerator.sSingleton;
}
- /*
- * ///////////////////////////////////////////////////// // Configuration
- * /////////////////////////////////////////////////////
- */
-
/**
- * Method for getting the shared random number generator used for generating
- * the UUIDs. This way the initialization cost is only taken once; access
- * need not be synchronized (or in cases where it has to, SecureRandom takes
- * care of it); it might even be good for getting really 'random' stuff to
- * get shared access..
+ * Method for getting the shared random number generator used for generating the UUIDs. This way the initialization
+ * cost is only taken once; access need not be synchronized (or in cases where it has to, SecureRandom takes care of
+ * it); it might even be good for getting really 'random' stuff to get shared access..
*
- * @return A Random number generator.
+ * @return A Random number generator
*/
public Random getRandomNumberGenerator() {
/*
@@ -121,7 +114,8 @@ public final class UUIDGenerator {
Random rnd = getRandomNumberGenerator();
byte[] dummy = new byte[6];
rnd.nextBytes(dummy);
- /* Need to set the broadcast bit to indicate it's not a real
+ /*
+ * Need to set the broadcast bit to indicate it's not a real
* address.
*/
dummy[0] |= (byte) 0x01;
@@ -133,10 +127,10 @@ public final class UUIDGenerator {
}
/**
- * If running java 6 or above, returns {@link NetworkInterface#getHardwareAddress()}, else return {@code null}.
- * The first hardware address is returned when iterating all the NetworkInterfaces
+ * If running java 6 or above, returns {@link NetworkInterface#getHardwareAddress()}, else return {@code null}. The
+ * first hardware address is returned when iterating all the NetworkInterfaces
*
- * @return A byte array containing the hardware address.
+ * @return A byte array containing the hardware address
*/
public static byte[] getHardwareAddress() {
try {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
index add7c12602..517997a7f6 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDTimer.java
@@ -19,63 +19,50 @@ package org.apache.activemq.artemis.utils;
import java.util.Random;
/**
- * UUIDTimer produces the time stamps required for time-based UUIDs. It works as
- * outlined in the UUID specification, with following implementation:
+ * UUIDTimer produces the time stamps required for time-based UUIDs. It works as outlined in the UUID specification,
+ * with following implementation:
* <ul>
- * <li>Java classes can only product time stamps with maximum resolution of one
- * millisecond (at least before JDK 1.5). To compensate, an additional counter
- * is used, so that more than one UUID can be generated between java clock
- * updates. Counter may be used to generate up to 10000 UUIDs for each distinct
- * java clock value.
- * <li>Due to even lower clock resolution on some platforms (older Windows
- * versions use 55 msec resolution), timestamp value can also advanced ahead of
- * physical value within limits (by default, up 100 millisecond ahead of
- * reported), iff necessary (ie. 10000 instances created before clock time
- * advances).
- * <li>As an additional precaution, counter is initialized not to 0 but to a
- * random 8-bit number, and each time clock changes, lowest 8-bits of counter
- * are preserved. The purpose it to make likelihood of multi-JVM multi-instance
- * generators to collide, without significantly reducing max. UUID generation
- * speed. Note though that using more than one generator (from separate JVMs) is
- * strongly discouraged, so hopefully this enhancement isn't needed. This 8-bit
- * offset has to be reduced from total max. UUID count to preserve ordering
- * property of UUIDs (ie. one can see which UUID was generated first for given
- * UUID generator); the resulting 9500 UUIDs isn't much different from the
- * optimal choice.
- * <li>Finally, as of version 2.0 and onwards, optional external timestamp
- * synchronization can be done. This is done similar to the way UUID
- * specification suggests; except that since there is no way to lock the whole
- * system, file-based locking is used. This works between multiple JVMs and Jug
- * instances.
+ * <li>Java classes can only product time stamps with maximum resolution of one millisecond (at least before JDK 1.5).
+ * To compensate, an additional counter is used, so that more than one UUID can be generated between java clock updates.
+ * Counter may be used to generate up to 10000 UUIDs for each distinct java clock value.
+ * <li>Due to even lower clock resolution on some platforms (older Windows versions use 55 msec resolution), timestamp
+ * value can also advanced ahead of physical value within limits (by default, up 100 millisecond ahead of reported), iff
+ * necessary (ie. 10000 instances created before clock time advances).
+ * <li>As an additional precaution, counter is initialized not to 0 but to a random 8-bit number, and each time clock
+ * changes, lowest 8-bits of counter are preserved. The purpose it to make likelihood of multi-JVM multi-instance
+ * generators to collide, without significantly reducing max. UUID generation speed. Note though that using more than
+ * one generator (from separate JVMs) is strongly discouraged, so hopefully this enhancement isn't needed. This 8-bit
+ * offset has to be reduced from total max. UUID count to preserve ordering property of UUIDs (ie. one can see which
+ * UUID was generated first for given UUID generator); the resulting 9500 UUIDs isn't much different from the optimal
+ * choice.
+ * <li>Finally, as of version 2.0 and onwards, optional external timestamp synchronization can be done. This is done
+ * similar to the way UUID specification suggests; except that since there is no way to lock the whole system,
+ * file-based locking is used. This works between multiple JVMs and Jug instances.
* </ul>
* <p>
* Some additional assumptions about calculating the timestamp:
* <ul>
- * <li>System.currentTimeMillis() is assumed to give time offset in UTC, or at
- * least close enough thing to get correct timestamps. The alternate route would
- * have to go through calendar object, use TimeZone offset to get to UTC, and
- * then modify. Using currentTimeMillis should be much faster to allow rapid
- * UUID creation.
- * <li>Similarly, the constant used for time offset between 1.1.1970 and start
- * of Gregorian calendar is assumed to be correct (which seems to be the case
- * when testing with Java calendars).
+ * <li>System.currentTimeMillis() is assumed to give time offset in UTC, or at least close enough thing to get correct
+ * timestamps. The alternate route would have to go through calendar object, use TimeZone offset to get to UTC, and then
+ * modify. Using currentTimeMillis should be much faster to allow rapid UUID creation.
+ * <li>Similarly, the constant used for time offset between 1.1.1970 and start of Gregorian calendar is assumed to be
+ * correct (which seems to be the case when testing with Java calendars).
* </ul>
* <p>
- * Note about synchronization: this class is assumed to always be called from a
- * synchronized context (caller locks on either this object, or a similar timer
- * lock), and so has no method synchronization.
+ * Note about synchronization: this class is assumed to always be called from a synchronized context (caller locks on
+ * either this object, or a similar timer lock), and so has no method synchronization.
*/
public class UUIDTimer {
+
/**
- * Since System.longTimeMillis() returns time from january 1st 1970, and
- * UUIDs need time from the beginning of gregorian calendar (15-oct-1582),
- * need to apply the offset:
+ * Since System.longTimeMillis() returns time from january 1st 1970, and UUIDs need time from the beginning of
+ * gregorian calendar (15-oct-1582), need to apply the offset:
*/
private static final long kClockOffset = 0x01b21dd213814000L;
/**
- * Also, instead of getting time in units of 100nsecs, we get something with
- * max resolution of 1 msec... and need the multiplier as well
+ * Also, instead of getting time in units of 100nsecs, we get something with max resolution of 1 msec... and need the
+ * multiplier as well
*/
private static final long kClockMultiplier = 10000;
@@ -94,27 +81,23 @@ public class UUIDTimer {
// // // Clock state:
/**
- * Additional state information used to protect against anomalous cases
- * (clock time going backwards, node id getting mixed up). Third byte is
- * actually used for seeding counter on counter overflow.
+ * Additional state information used to protect against anomalous cases (clock time going backwards, node id getting
+ * mixed up). Third byte is actually used for seeding counter on counter overflow.
*/
private final byte[] mClockSequence = new byte[3];
/**
- * Last physical timestamp value <code>System.currentTimeMillis()</code>
- * returned: used to catch (and report) cases where system clock goes
- * backwards. Is also used to limit "drifting", that is, amount timestamps
- * used can differ from the system time value. This value is not guaranteed
- * to be monotonically increasing.
+ * Last physical timestamp value {@code System.currentTimeMillis()} returned: used to catch (and report) cases where
+ * system clock goes backwards. Is also used to limit "drifting", that is, amount timestamps used can differ from the
+ * system time value. This value is not guaranteed to be monotonically increasing.
*/
private long mLastSystemTimestamp = 0L;
/**
- * Timestamp value last used for generating a UUID (along with
- * {@link #mClockCounter}. Usually the same as {@link #mLastSystemTimestamp},
- * but not always (system clock moved backwards). Note that this value is
- * guaranteed to be monotonically increasing; that is, at given absolute time
- * points t1 and t2 (where t2 is after t1), t1 <= t2 will always hold true.
+ * Timestamp value last used for generating a UUID (along with {@link #mClockCounter}. Usually the same as
+ * {@link #mLastSystemTimestamp}, but not always (system clock moved backwards). Note that this value is guaranteed
+ * to be monotonically increasing; that is, at given absolute time points t1 and t2 (where t2 is after t1), t1 <= t2
+ * will always hold true.
*/
private long mLastUsedTimestamp = 0L;
@@ -133,16 +116,15 @@ public class UUIDTimer {
private void initCounters(final Random rnd) {
/*
- * Let's generate the clock sequence field now; as with counter, this
- * reduces likelihood of collisions (as explained in UUID specs)
+ * Let's generate the clock sequence field now; as with counter, this reduces likelihood of collisions (as
+ * explained in UUID specs)
*/
rnd.nextBytes(mClockSequence);
/*
- * Ok, let's also initialize the counter... Counter is used to make it
- * slightly less likely that two instances of UUIDGenerator (from separate
- * JVMs as no more than one can be created in one JVM) would produce
- * colliding time-based UUIDs. The practice of using multiple generators,
- * is strongly discouraged, of course, but just in case...
+ * Ok, let's also initialize the counter... Counter is used to make it slightly less likely that two instances of
+ * UUIDGenerator (from separate JVMs as no more than one can be created in one JVM) would produce colliding
+ * time-based UUIDs. The practice of using multiple generators, is strongly discouraged, of course, but just in
+ * case...
*/
mClockCounter = mClockSequence[2] & 0xFF;
}
@@ -154,10 +136,7 @@ public class UUIDTimer {
long systime = System.currentTimeMillis();
- /*
- * Let's first verify that the system time is not going backwards;
- * independent of whether we can use it:
- */
+ // Let's first verify that the system time is not going backwards; independent of whether we can use it:
if (systime < mLastSystemTimestamp) {
// Logger.logWarning("System time going backwards! (got value
// "+systime+", last "+mLastSystemTimestamp);
@@ -166,15 +145,11 @@ public class UUIDTimer {
}
/*
- * But even without it going backwards, it may be less than the last one
- * used (when generating UUIDs fast with coarse clock resolution; or if
- * clock has gone backwards over reboot etc).
+ * But even without it going backwards, it may be less than the last one used (when generating UUIDs fast with
+ * coarse clock resolution; or if clock has gone backwards over reboot etc).
*/
if (systime <= mLastUsedTimestamp) {
- /*
- * Can we just use the last time stamp (ok if the counter hasn't hit
- * max yet)
- */
+ // Can we just use the last time stamp (ok if the counter hasn't hit max yet)
if (mClockCounter < UUIDTimer.kClockMultiplier) { // yup, still have room
systime = mLastUsedTimestamp;
} else { // nope, have to roll over to next value and maybe wait
@@ -186,17 +161,15 @@ public class UUIDTimer {
// random sequence");
/*
- * Clock counter is now at exactly the multiplier; no use just
- * anding its value. So, we better get some random numbers
- * instead...
+ * Clock counter is now at exactly the multiplier; no use just anding its value. So, we better get some
+ * random numbers instead...
*/
initCounters(mRnd);
/*
- * But do we also need to slow down? (to try to keep virtual time
- * close to physical time; ie. either catch up when system clock has
- * been moved backwards, or when coarse clock resolution has forced
- * us to advance virtual timer too far)
+ * But do we also need to slow down? (to try to keep virtual time close to physical time; ie. either catch
+ * up when system clock has been moved backwards, or when coarse clock resolution has forced us to advance
+ * virtual timer too far)
*/
if (actDiff >= UUIDTimer.kMaxClockAdvance) {
UUIDTimer.slowDown(origTime, actDiff);
@@ -204,9 +177,8 @@ public class UUIDTimer {
}
} else {
/*
- * Clock has advanced normally; just need to make sure counter is reset
- * to a low value (need not be 0; good to leave a small residual to
- * further decrease collisions)
+ * Clock has advanced normally; just need to make sure counter is reset to a low value (need not be 0; good to
+ * leave a small residual to further decrease collisions)
*/
mClockCounter &= 0xFF;
}
@@ -214,8 +186,8 @@ public class UUIDTimer {
mLastUsedTimestamp = systime;
/*
- * Now, let's translate the timestamp to one UUID needs, 100ns unit offset
- * from the beginning of Gregorian calendar...
+ * Now, let's translate the timestamp to one UUID needs, 100ns unit offset from the beginning of Gregorian
+ * calendar...
*/
systime *= UUIDTimer.kClockMultiplierL;
systime += UUIDTimer.kClockOffset;
@@ -225,10 +197,7 @@ public class UUIDTimer {
// and then increase
++mClockCounter;
- /*
- * Time fields are nicely split across the UUID, so can't just linearly
- * dump the stamp:
- */
+ // Time fields are nicely split across the UUID, so can't just linearly dump the stamp:
int clockHi = (int) (systime >>> 32);
int clockLo = (int) systime;
@@ -246,17 +215,12 @@ public class UUIDTimer {
private static final int MAX_WAIT_COUNT = 50;
/**
- * Simple utility method to use to wait for couple of milliseconds, to let
- * system clock hopefully advance closer to the virtual timestamps used.
- * Delay is kept to just a millisecond or two, to prevent excessive blocking;
- * but that should be enough to eventually synchronize physical clock with
- * virtual clock values used for UUIDs.
+ * Simple utility method to use to wait for couple of milliseconds, to let system clock hopefully advance closer to
+ * the virtual timestamps used. Delay is kept to just a millisecond or two, to prevent excessive blocking; but that
+ * should be enough to eventually synchronize physical clock with virtual clock values used for UUIDs.
*/
private static void slowDown(final long startTime, final long actDiff) {
- /*
- * First, let's determine how long we'd like to wait. This is based on how
- * far ahead are we as of now.
- */
+ // First, let's determine how long we'd like to wait. This is based on how far ahead are we as of now.
long ratio = actDiff / UUIDTimer.kMaxClockAdvance;
long delay;
@@ -280,8 +244,8 @@ public class UUIDTimer {
}
delay = 1L;
/*
- * This is just a sanity check: don't want an "infinite" loop if clock
- * happened to be moved backwards by, say, an hour...
+ * This is just a sanity check: don't want an "infinite" loop if clock happened to be moved backwards by, say,
+ * an hour...
*/
if (++counter > UUIDTimer.MAX_WAIT_COUNT) {
break;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
index 49e301085e..45e9b630eb 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/Waiter.java
@@ -27,8 +27,10 @@ public class Waiter {
boolean result();
}
- /** This method will wait for the condition.result to be true or a timeout has ocurred.
- * it will return the last result. */
+ /**
+ * This method will wait for the condition.result to be true or a timeout has ocurred. it will return the last
+ * result.
+ */
public static boolean waitFor(Condition condition, TimeUnit unit, long timeout, TimeUnit parkUnit, long parkTime) {
long timeoutNanos = unit.toNanos(timeout);
final long deadline = System.nanoTime() + timeoutNanos;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
index e1ea54e0c3..43bbd9cf0c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ArtemisExecutor.java
@@ -24,18 +24,15 @@ import java.util.function.Consumer;
public interface ArtemisExecutor extends Executor {
/**
- * Artemis is supposed to implement this properly, however in tests or tools
- * this can be used as a fake, doing a simple delegate and using the default methods implemented here.
- * @param executor
- * @return
+ * Artemis is supposed to implement this properly, however in tests or tools this can be used as a fake, doing a
+ * simple delegate and using the default methods implemented here.
*/
static ArtemisExecutor delegate(Executor executor) {
return executor::execute;
}
/**
- * It will wait the current execution (if there is one) to finish
- * but will not complete any further executions.
+ * It will wait the current execution (if there is one) to finish but will not complete any further executions.
*
* @param onPendingTask it will be called for each pending task found
* @return the number of pending tasks that won't be executed
@@ -44,12 +41,9 @@ public interface ArtemisExecutor extends Executor {
return 0;
}
- /** To be used to flush an executor from a different thread.
- * WARNING: Do not call this within the executor. That would be stoopid ;)
- *
- * @param timeout
- * @param unit
- * @return
+ /**
+ * To be used to flush an executor from a different thread.
+ * <b>WARNING</b>: Do not call this within the executor. That would be stoopid ;)
*/
default boolean flush(long timeout, TimeUnit unit) {
CountDownLatch latch = new CountDownLatch(1);
@@ -62,8 +56,7 @@ public interface ArtemisExecutor extends Executor {
}
/**
- * It will wait the current execution (if there is one) to finish
- * but will not complete any further executions
+ * It will wait the current execution (if there is one) to finish but will not complete any further executions
*/
default int shutdownNow() {
return shutdownNow(t -> {
@@ -86,16 +79,16 @@ public interface ArtemisExecutor extends Executor {
return false;
}
- /** If this OrderedExecutor is fair, it will yield for another executors after each task ran */
+ /**
+ * If this OrderedExecutor is fair, it will yield for another executors after each task ran
+ */
default ArtemisExecutor setFair(boolean fair) {
return this;
}
-
-
/**
- * This will verify if the executor is flushed with no wait (or very minimal wait if not the {@link org.apache.activemq.artemis.utils.actors.OrderedExecutor}
- * @return
+ * This will verify if the executor is flushed with no wait (or very minimal wait if not the
+ * {@link org.apache.activemq.artemis.utils.actors.OrderedExecutor}
*/
default boolean isFlushed() {
CountDownLatch latch = new CountDownLatch(1);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
index cd76ba493e..6010a028a0 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/HandlerBase.java
@@ -18,10 +18,8 @@
package org.apache.activemq.artemis.utils.actors;
/**
- * This abstract class will encapsulate
- * ThreadLocals to determine when a class is a handler.
- * This is because some functionality has to be avoided if inHandler().
- *
+ * This abstract class will encapsulate ThreadLocals to determine when a class is a handler. This is because some
+ * functionality has to be avoided if inHandler().
*/
public abstract class HandlerBase {
@@ -32,7 +30,10 @@ public abstract class HandlerBase {
// There is only going to be a single Thread using the counter, so it is safe to cache this instance
private final Counter cachedCounter = new Counter();
- /** an actor could be used within an OrderedExecutor. So we need this counter to decide if there's a Handler anywhere in the stack trace */
+ /**
+ * an actor could be used within an OrderedExecutor. So we need this counter to decide if there's a Handler anywhere
+ * in the stack trace
+ */
private static final ThreadLocal<Counter> counterThreadLocal = new ThreadLocal<>();
protected void enter() {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutor.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutor.java
index b2352dd145..340390ac0f 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutor.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutor.java
@@ -25,7 +25,7 @@ import java.lang.invoke.MethodHandles;
/**
* An executor that always runs all tasks in order, using a delegate executor to run the tasks.
- * <br>
+ * <p>
* More specifically, any call B to the {@link #execute(Runnable)} method that happens-after another call A to the
* same method, will result in B's task running after A's.
*/
@@ -44,8 +44,10 @@ public class OrderedExecutor extends ProcessorBase<Runnable> implements ArtemisE
return fair;
}
+ /**
+ * If this OrderedExecutor is fair, it will yield for another executors after each task ran
+ */
@Override
- /** If this OrderedExecutor is fair, it will yield for another executors after each task ran */
public OrderedExecutor setFair(boolean fair) {
this.fair = fair;
return this;
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
index 6ce3cc9ccb..828e27d116 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.java
@@ -21,6 +21,7 @@ import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.utils.ExecutorFactory;
+
/**
* A factory for producing executors that run all tasks in order, which delegate to a single common executor instance.
*/
@@ -63,7 +64,9 @@ public final class OrderedExecutorFactory implements ExecutorFactory {
return new OrderedExecutor(parent).setFair(fair);
}
- /** I couldn't figure out how to make a new method to return a generic Actor with a given type */
+ /**
+ * I couldn't figure out how to make a new method to return a generic Actor with a given type
+ */
public Executor getParent() {
return parent;
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
index 323da6a5d7..ea018e29e1 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors/ProcessorBase.java
@@ -38,8 +38,8 @@ public abstract class ProcessorBase<T> extends HandlerBase {
private final Executor delegate;
/**
- * Using a method reference instead of an inner classes allows the caller to reduce the pointer chasing
- * when accessing ProcessorBase.this fields/methods.
+ * Using a method reference instead of an inner classes allows the caller to reduce the pointer chasing when
+ * accessing ProcessorBase.this fields/methods.
*/
private final Runnable task = this::executePendingTasks;
@@ -110,7 +110,9 @@ public abstract class ProcessorBase<T> extends HandlerBase {
this.yielded = true;
}
- /** It will shutdown the executor however it will not wait for finishing tasks*/
+ /**
+ * It will shutdown the executor however it will not wait for finishing tasks
+ */
public int shutdownNow(Consumer<? super T> onPendingItem, int timeout, TimeUnit unit) {
//alert anyone that has been requested (at least) an immediate shutdown
requestedForcedShutdown = true;
@@ -146,10 +148,9 @@ public abstract class ProcessorBase<T> extends HandlerBase {
}
/**
- * WARNING: This will only flush when all the activity is suspended.
- * don't expect success on this call if another thread keeps feeding the queue
- * this is only valid on situations where you are not feeding the queue,
- * like in shutdown and failover situations.
+ * WARNING: This will only flush when all the activity is suspended. don't expect success on this call if another
+ * thread keeps feeding the queue this is only valid on situations where you are not feeding the queue, like in
+ * shutdown and failover situations.
*/
public final boolean flush(long timeout, TimeUnit unit) {
if (this.state == STATE_NOT_RUNNING) {
@@ -189,9 +190,9 @@ public abstract class ProcessorBase<T> extends HandlerBase {
}
/**
- * This has to be called on the assumption that state!=STATE_RUNNING.
- * It is packed separately from {@link #task(Object)} just for performance reasons: it
- * handles the uncommon execution cases for bursty scenarios i.e. the slowest execution path.
+ * This has to be called on the assumption that state!=STATE_RUNNING. It is packed separately from
+ * {@link #task(Object)} just for performance reasons: it handles the uncommon execution cases for bursty scenarios
+ * i.e. the slowest execution path.
*/
private void onAddedTaskIfNotRunning(int state) {
if (state == STATE_NOT_RUNNING) {
@@ -207,10 +208,10 @@ public abstract class ProcessorBase<T> extends HandlerBase {
}
/**
- * Returns the remaining items to be processed.
- * <p>
- * This method is safe to be called by different threads and its accuracy is subject to concurrent modifications.<br>
- * It is meant to be used only for test purposes, because of its {@code O(n)} cost.
+ * This method is safe to be called by different threads and its accuracy is subject to concurrent modifications. It
+ * is meant to be used only for test purposes, because of its {@code O(n)} cost.
+ *
+ * @return the remaining items to be processed
*/
public final int remaining() {
return tasks.size();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
index cc89858660..191f55fb59 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/bean/MetaBean.java
@@ -34,13 +34,13 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * Receives a metadata about a class with methods to read, write and certain gates.
- * And provides a generic logic to convert to and from JSON.
+ * Receives a metadata about a class with methods to read, write and certain gates. And provides a generic logic to
+ * convert to and from JSON.
* <p>
- * As a historical context the first try to make a few objects more dynamic (e.g. AddressSettings) was
- * around BeanUtils however there was some implicit logic on when certain settings were Null or default values.
- * for that reason I decided for a meta-data approach where extra semantic could be applied for each individual attributes
- * rather than a generic BeanUtils parser.
+ * As a historical context the first try to make a few objects more dynamic (e.g. AddressSettings) was around BeanUtils
+ * however there was some implicit logic on when certain settings were Null or default values. for that reason I decided
+ * for a meta-data approach where extra semantic could be applied for each individual attributes rather than a generic
+ * BeanUtils parser.
*/
public class MetaBean<T> {
@@ -50,13 +50,15 @@ public class MetaBean<T> {
/**
* Accepted types:
- * String.class
- * SimpleString.class
- * Integer.class
- * Long.class
- * Double.class
- * Float.class
- * Enumerations
+ * <ul>
+ * <li>String.class
+ * <li>SimpleString.class
+ * <li>Integer.class
+ * <li>Long.class
+ * <li>Double.class
+ * <li>Float.class
+ * <li>Enumerations
+ * </ul>
*/
public MetaBean add(Class type,
String name,
@@ -133,7 +135,9 @@ public class MetaBean<T> {
});
}
- /** Generates a random Object using the setters for testing purposes. */
+ /**
+ * Generates a random Object using the setters for testing purposes.
+ */
public void setRandom(T randomObject) {
forEach((type, name, setter, getter, gate) -> {
if (Enum.class.isAssignableFrom(type)) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
index 9de3f6422b..90be5fc5dd 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ArrayResettableIterator.java
@@ -19,10 +19,8 @@ package org.apache.activemq.artemis.utils.collections;
import java.util.Collection;
/**
- * Provides an Array Iterator that is able to reset, allowing you to iterate over the full array.
- * It achieves this though by moving end position mark to the the current cursors position,
- * so it round robins, even with reset.
- * @param <E>
+ * Provides an Array Iterator that is able to reset, allowing you to iterate over the full array. It achieves this
+ * though by moving end position mark to the the current cursors position, so it round robins, even with reset.
*/
public class ArrayResettableIterator<E> implements ResettableIterator<E> {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentAppendOnlyChunkedList.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentAppendOnlyChunkedList.java
index 7d0702601b..2cdf2e4c05 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentAppendOnlyChunkedList.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentAppendOnlyChunkedList.java
@@ -22,7 +22,8 @@ import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.function.IntFunction;
/**
- * This collection is a concurrent append-only list that grows in chunks.<br>
+ * This collection is a concurrent append-only list that grows in chunks.
+ * <p>
* It's safe to be used by many threads concurrently and has a max capacity of {@link Integer#MAX_VALUE}.
*/
public final class ConcurrentAppendOnlyChunkedList<E> {
@@ -93,7 +94,7 @@ public final class ConcurrentAppendOnlyChunkedList<E> {
}
/**
- * Returns the element at the specified position in this collection or {@code null} if not found.
+ * {@return the element at the specified position in this collection or {@code null} if not found.}
*/
public E get(int index) {
if (index < 0) {
@@ -118,8 +119,8 @@ public final class ConcurrentAppendOnlyChunkedList<E> {
}
/**
- * Implements a lock-free version of the optimization used on {@link java.util.LinkedList#get(int)} to speed up queries
- * ie backward search of a node if needed.
+ * Implements a lock-free version of the optimization used on {@link java.util.LinkedList#get(int)} to speed up
+ * queries i.e. backward search of a node if needed.
*/
private AtomicChunk<E> getChunkOf(final int index, final long lastIndex) {
final int chunkSizeLog2 = this.chunkSizeLog2;
@@ -160,7 +161,7 @@ public final class ConcurrentAppendOnlyChunkedList<E> {
* Appends the specified element to the end of this collection.
*
* @throws NullPointerException if {@code e} is {@code null}
- **/
+ */
public void add(E e) {
Objects.requireNonNull(e);
while (true) {
@@ -227,9 +228,9 @@ public final class ConcurrentAppendOnlyChunkedList<E> {
}
/**
- * Returns an array containing all of the elements in this collection in proper
- * sequence (from first to last element).<br>
- * {@code arrayAllocator} will be used to instantiate the array of the correct size with the right runtime type.
+ * {@return an array containing all of the elements in this collection in proper sequence (from first to last
+ * element); {@code arrayAllocator} will be used to instantiate the array of the correct size with the right runtime
+ * type}
*/
public E[] toArray(IntFunction<E[]> arrayAllocator, int startIndex) {
if (startIndex < 0) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentHashSet.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentHashSet.java
index 21c15885a4..93b0b809dd 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentHashSet.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentHashSet.java
@@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentMap;
/**
* A ConcurrentHashSet.
- *
+ * <p>
* Offers same concurrency as ConcurrentHashMap but for a Set
*/
public class ConcurrentHashSet<E> extends AbstractSet<E> implements ConcurrentSet<E> {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java
index f1bc07b49d..6fef04fc7b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashMap.java
@@ -28,14 +28,12 @@ import static org.apache.activemq.artemis.utils.Preconditions.checkNotNull;
/**
* Map from long to an Object.
- *
+ * <p>
* Provides similar methods as a {@literal ConcurrentMap<long,Object>} with 2 differences:
* <ol>
* <li>No boxing/unboxing from {@literal long -> Long}
* <li>Open hash map with linear probing, no node allocations to store the values
* </ol>
- *
- * @param <V>
*/
@SuppressWarnings("unchecked")
public class ConcurrentLongHashMap<V> {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashSet.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashSet.java
index 794ecb6a57..1cac4cc8e5 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashSet.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ConcurrentLongHashSet.java
@@ -30,7 +30,7 @@ import static org.apache.activemq.artemis.utils.Preconditions.checkArgument;
/**
* Concurrent hash set for primitive longs
- *
+ * <p>
* Provides similar methods as a ConcurrentSet<Long> but since it's an open hash map with linear probing, no node
* allocations are required to store the values.
* <p>
@@ -136,7 +136,6 @@ public class ConcurrentLongHashSet {
/**
* Remove an existing entry if found
*
- * @param item
* @return true if removed or false if item was not present
*/
public boolean remove(long item) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
index e70f5caa80..b060cf1fb3 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedList.java
@@ -38,10 +38,14 @@ public interface LinkedList<E> {
void clearID();
- /** this makes possibl to use {@link #removeWithID(String, long)} */
+ /**
+ * this makes possibl to use {@link #removeWithID(String, long)}
+ */
void setNodeStore(NodeStore<E> store);
- /** you need to call {@link #setNodeStore(NodeStore)} before you are able to call this method. */
+ /**
+ * you need to call {@link #setNodeStore(NodeStore)} before you are able to call this method.
+ */
E removeWithID(String listID, long id);
void forEach(Consumer<E> consumer);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListImpl.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListImpl.java
index 7d554bddc6..9eadd1be08 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListImpl.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListImpl.java
@@ -27,8 +27,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * A linked list implementation which allows multiple iterators to exist at the same time on the queue, and which see any
- * elements added or removed from the queue either directly or via iterators.
+ * A linked list implementation which allows multiple iterators to exist at the same time on the queue, and which see
+ * any elements added or removed from the queue either directly or via iterators.
* <p>
* This class is not thread safe.
*/
@@ -220,11 +220,10 @@ public class LinkedListImpl<E> implements LinkedList<E> {
return;
}
- // in our usage, most of the times we will just add to the end
- // as the QueueImpl cancellations in AMQP will return the buffer back to the queue, in the order they were consumed.
- // There is an exception to that case, when there are more messages on the queue.
- // This would be an optimization for our usage.
- // avoiding scanning the entire List just to add at the end, so we compare the end first.
+ // In our usage, most of the times we will just add to the end as the QueueImpl cancellations in AMQP will
+ // return the buffer back to the queue in the order they were consumed. There is an exception to that case,
+ // when there are more messages on the queue. This would be an optimization for our usage - avoiding scanning
+ // the entire List just to add at the end, so we compare the end first.
if (comparator.compare(tail.val(), e) >= 0) {
logger.trace("addTail as e={} and tail={}", e, tail.val());
addTail(e);
@@ -255,14 +254,14 @@ public class LinkedListImpl<E> implements LinkedList<E> {
return;
}
- // this shouldn't happen as the tail was compared before iterating
- // the only possibilities for this to happen are:
+ // This shouldn't happen as the tail was compared before iterating the only possibilities for this to happen
+ // are:
// - there is a bug on the comparator
// - This method is buggy
// - The list wasn't properly synchronized as this list does't support concurrent access
//
// Also I'm not bothering about creating a Logger ID for this, because the only reason for this code to exist
- // is because my OCD level is not letting this out.
+ // is because my OCD level is not letting this out.
throw new IllegalStateException("Cannot find a suitable place for your element, There's a mismatch in the comparator or there was concurrent adccess on the queue");
}
}
@@ -335,8 +334,7 @@ public class LinkedListImpl<E> implements LinkedList<E> {
@Override
public void clear() {
// Clearing all of the links between nodes is "unnecessary", but:
- // - helps a generational GC if the discarded nodes inhabit
- // more than one generation
+ // - helps a generational GC if the discarded nodes inhabit more than one generation
// - is sure to free memory even if there is a reachable Iterator
while (poll() != null) {
@@ -404,8 +402,8 @@ public class LinkedListImpl<E> implements LinkedList<E> {
LinkedListImpl.this.nudgeIterators(toRemove);
}
- //Help GC - otherwise GC potentially has to traverse a very long list to see if elements are reachable, this can result in OOM
- //https://jira.jboss.org/browse/HORNETQ-469
+ // Help GC - otherwise GC potentially has to traverse a very long list to see if elements are reachable, this can
+ // result in OOM
toRemove.next = toRemove.prev = null;
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListIterator.java
index 5508934ffa..c750fe3894 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LinkedListIterator.java
@@ -20,14 +20,17 @@ import java.util.Iterator;
/**
* A LinkedListIterator
- *
+ * <p>
* This iterator allows the last element to be repeated in the next call to hasNext or next
*/
public interface LinkedListIterator<E> extends Iterator<E>, AutoCloseable {
void repeat();
- /** This method is doing exactly what {@link Iterator#remove()} would do, however it will return the element being removed. */
+ /**
+ * This method is doing exactly what {@link Iterator#remove()} would do, however it will return the element being
+ * removed.
+ */
E removeLastElement();
@Override
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LongHashSet.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LongHashSet.java
index fb8f9c553b..ba0bd1bd8a 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LongHashSet.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/LongHashSet.java
@@ -28,13 +28,14 @@ import java.util.NoSuchElementException;
import java.util.Set;
/**
- * A hash set implementation of {@literal Set<Long>} that uses open addressing values.
- * To minimize the memory footprint, this class uses open addressing rather than chaining.
- * Collisions are resolved using linear probing. Deletions implement compaction, so cost of
- * remove can approach O(N) for full maps, which makes a small loadFactor recommended.
- *
- * The implementation is based on <a href=https://github.com/real-logic/agrona/blob/master/agrona/src/main/java/org/agrona/collections/IntHashSet.java>Agrona IntHashSet</a>
- * but uses long primitive keys and a different {@link #MISSING_VALUE} to account for {@link Long#hashCode} being 0 for -1.
+ * A hash set implementation of {@literal Set<Long>} that uses open addressing values. To minimize the memory footprint,
+ * this class uses open addressing rather than chaining. Collisions are resolved using linear probing. Deletions
+ * implement compaction, so cost of remove can approach O(N) for full maps, which makes a small loadFactor recommended.
+ * <p>
+ * The implementation is based on <a
+ * href=https://github.com/real-logic/agrona/blob/master/agrona/src/main/java/org/agrona/collections/IntHashSet.java>Agrona
+ * IntHashSet</a> but uses long primitive keys and a different {@link #MISSING_VALUE} to account for
+ * {@link Long#hashCode} being 0 for -1.
*/
public class LongHashSet extends AbstractSet<Long> implements Serializable {
@@ -100,7 +101,7 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
/**
* Get the load factor beyond which the set will increase size.
*
- * @return load factor for when the set should increase size.
+ * @return load factor for when the set should increase size
*/
public float loadFactor() {
return loadFactor;
@@ -109,17 +110,17 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
/**
* Get the total capacity for the set to which the load factor with be a fraction of.
*
- * @return the total capacity for the set.
+ * @return the total capacity for the set
*/
public int capacity() {
return values.length;
}
/**
- * Get the actual threshold which when reached the map will resize.
- * This is a function of the current capacity and load factor.
+ * Get the actual threshold which when reached the map will resize. This is a function of the current capacity and
+ * load factor.
*
- * @return the threshold when the map will resize.
+ * @return the threshold when the map will resize
*/
public int resizeThreshold() {
return resizeThreshold;
@@ -266,8 +267,8 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
}
/**
- * Compact the backing arrays by rehashing with a capacity just larger than current size
- * and giving consideration to the load factor.
+ * Compact the backing arrays by rehashing with a capacity just larger than current size and giving consideration to
+ * the load factor.
*/
public void compact() {
final int idealCapacity = (int) Math.round(size() * (1.0 / loadFactor));
@@ -286,7 +287,7 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
* Contains method that does not box values.
*
* @param value to be check for if the set contains it.
- * @return true if the value is contained in the set otherwise false.
+ * @return true if the value is contained in the set otherwise false
* @see Collection#contains(Object)
*/
public boolean contains(final long value) {
@@ -447,7 +448,7 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
* LongHashSet specialised variant of {this#containsAll(Collection)}.
*
* @param other int hash set to compare against.
- * @return true if every element in other is in this.
+ * @return true if every element in other is in this
*/
public boolean containsAll(final LongHashSet other) {
for (final long value : other.values) {
@@ -558,7 +559,7 @@ public class LongHashSet extends AbstractSet<Long> implements Serializable {
/**
* Strongly typed alternative of {@link Iterator#next()} to avoid boxing.
*
- * @return the next int value.
+ * @return the next int value
*/
public long nextValue() {
if (remaining == 1 && containsMissingValue) {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/MultiResettableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/MultiResettableIterator.java
index fb28d02380..fcb7b3471b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/MultiResettableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/MultiResettableIterator.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.utils.collections;
/**
- * Extends MultiIterator, adding the ability if the underlying iterators are resettable, then its self can reset.
- * It achieves this by going back to the first iterator, and as moves to another iterator it resets it.
+ * Extends MultiIterator, adding the ability if the underlying iterators are resettable, then its self can reset. It
+ * achieves this by going back to the first iterator, and as moves to another iterator it resets it.
*
* @param <E> type of the class of the iterator.
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java
index 1ea2bdf820..979f49cafe 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NoOpMap.java
@@ -23,9 +23,9 @@ import java.util.Map;
import java.util.Set;
/**
- * This class implements a Map, but actually doesnt store anything, it is similar in idea to an EmptyMap,
- * but where mutation methods simply do a no op rather than UnsupportedOperationException as with EmptyMap.
- *
+ * This class implements a Map, but actually doesnt store anything, it is similar in idea to an EmptyMap, but where
+ * mutation methods simply do a no op rather than UnsupportedOperationException as with EmptyMap.
+ * <p>
* This is used in QueueImpl when message groups is disabled.
*
* @param <K> the key type.
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NodeStore.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NodeStore.java
index b07ce23e1a..6eb7455d06 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NodeStore.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/NodeStore.java
@@ -22,8 +22,10 @@ package org.apache.activemq.artemis.utils.collections;
*/
public interface NodeStore<E> {
- /** When you store the node, make sure you find what is the ID and ListID for the element you are storing
- * as later one you will need to provide the node based on list and id as specified on {@link #getNode(String, long)} */
+ /**
+ * When you store the node, make sure you find what is the ID and ListID for the element you are storing as later one
+ * you will need to provide the node based on list and id as specified on {@link #getNode(String, long)}
+ */
void storeNode(E element, LinkedListImpl.Node<E> node);
LinkedListImpl.Node<E> getNode(String listID, long id);
@@ -38,11 +40,14 @@ public interface NodeStore<E> {
return null;
}
- /** this is meant to be a quick help to Garbage Collection.
- * Whenever the IDSupplier list is being cleared, you should first call the clear method and
- * empty every list before you let the instance go. */
+ /**
+ * This is meant to be a quick help to Garbage Collection. Whenever the IDSupplier list is being cleared, you should
+ * first call the clear method and empty every list before you let the instance go.
+ */
void clear();
- /** ths should return the sum of all the sizes. for test assertions. */
+ /**
+ * ths should return the sum of all the sizes. for test assertions.
+ */
int size();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java
index f90c92a099..3d76c1abeb 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityCollection.java
@@ -31,11 +31,11 @@ import java.util.stream.Collectors;
/**
* This class's purpose is to hold the the different collections used for each priority level.
- *
- * A supplier is required to provide the underlying collection needed when a new priority level is seen,
- * and the end behaviour is that of the underlying collection, e.g. if set add will follow set's add semantics,
- * if list, then list semantics.
- *
+ * <p>
+ * A supplier is required to provide the underlying collection needed when a new priority level is seen, and the end
+ * behaviour is that of the underlying collection, e.g. if set add will follow set's add semantics, if list, then list
+ * semantics.
+ * <p>
* Methods getArray, setArray MUST never be exposed, and all array modifications must go through these.
*
* @param <E> The type this class may hold, this is generic as can be anything that extends PriorityAware.
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityLinkedList.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityLinkedList.java
index 03a616b5f8..d9adb8c93c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityLinkedList.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/PriorityLinkedList.java
@@ -19,8 +19,9 @@ package org.apache.activemq.artemis.utils.collections;
import java.util.function.Supplier;
/**
- * A type of linked list which maintains items according to a priority
- * and allows adding and removing of elements at both ends, and peeking.<br>
+ * A type of linked list which maintains items according to a priority and allows adding and removing of elements at
+ * both ends, and peeking.
+ * <p>
* Only {@link #size()} and {@link #isEmpty()} are safe to be called concurrently.
*/
public interface PriorityLinkedList<E> {
@@ -33,30 +34,29 @@ public interface PriorityLinkedList<E> {
E poll();
- /** just look at the first element on the list */
+ /**
+ * just look at the first element on the list
+ */
E peek();
void clear();
/**
* @see LinkedList#setNodeStore(NodeStore)
- * @param supplier
*/
void setNodeStore(Supplier<NodeStore<E>> supplier);
E removeWithID(String listID, long id);
/**
- * Returns the size of this list.<br>
- * It is safe to be called concurrently.
+ * {@return the size of this list; safe to be called concurrently}
*/
int size();
LinkedListIterator<E> iterator();
/**
- * Returns {@code true} if empty, {@code false} otherwise.<br>
- * It is safe to be called concurrently.
+ * {@return {@code true} if empty, {@code false} otherwise; safe to be called concurrently}
*/
boolean isEmpty();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
index 9091a4eed3..5b72961e96 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/ResettableIterator.java
@@ -21,8 +21,8 @@ import java.util.Iterator;
public interface ResettableIterator<E> extends Iterator<E> {
/**
- * Resets the iterator so that you can iterate over all elements from your current position.
- * Your current position (when reached again) signals the end of iteration as if the collection is circular.
+ * Resets the iterator so that you can iterate over all elements from your current position. Your current position
+ * (when reached again) signals the end of iteration as if the collection is circular.
*/
void reset();
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/SparseArrayLinkedList.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/SparseArrayLinkedList.java
index ab8bb734ba..ba9114a091 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/SparseArrayLinkedList.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/SparseArrayLinkedList.java
@@ -24,13 +24,14 @@ import java.util.function.Consumer;
import java.util.function.Predicate;
/**
- * This list share the same motivation and structure of https://en.wikipedia.org/wiki/Unrolled_linked_list:
- * it's a linked list of arrays/chunks of {@code T}.<br>
+ * This list share the same motivation and structure of https://en.wikipedia.org/wiki/Unrolled_linked_list: it's a
+ * linked list of arrays/chunks of {@code T}.
+ * <p>
* Differently from an {@code UnrolledLinkedList} this list doesn't optimize addition and removal to achieve a balanced
- * utilization among chunks ie a chunk is removed only if empty and chunks can't be merged.
- * This list has been optimized for small-sized chunks (ideally <= 32 elements): this allow search/removal to
- * be performed with a greedy approach despite a sparse chunk utilization (ie chunks contains few sparse elements).<br>
- *
+ * utilization among chunks ie a chunk is removed only if empty and chunks can't be merged. This list has been optimized
+ * for small-sized chunks (ideally <= 32 elements): this allow search/removal to be performed with a greedy approach
+ * despite a sparse chunk utilization (ie chunks contains few sparse elements).
+ * <p>
* From the memory footprint's point of view, this list won't remove the last remaining array although empty to optimize
* the case where its capacity would be enough to hold incoming elements, hence saving a new array allocation.
*/
@@ -231,21 +232,21 @@ public final class SparseArrayLinkedList<E> {
}
/**
- * Returns the number of elements of this list.
+ * {@return the number of elements of this list}
*/
public long size() {
return size;
}
/**
- * Returns the configured capacity of each sparse array/chunk.
+ * {@return the configured capacity of each sparse array/chunk}
*/
public int sparseArrayCapacity() {
return sparseArrayCapacity;
}
/**
- * Returns the number of sparse arrays/chunks of this list.
+ * {@return the number of sparse arrays/chunks of this list}
*/
public int sparseArraysCount() {
return list.size();
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
index e2a367ab36..f3c4bea74c 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/TypedProperties.java
@@ -57,9 +57,8 @@ import static org.apache.activemq.artemis.utils.DataConstants.STRING;
/**
* Property Value Conversion.
* <p>
- * This implementation follows section 3.5.4 of the <i>Java Message Service</i> specification
- * (Version 1.1 April 12, 2002).
- * <p>
+ * This implementation follows section 3.5.4 of the <i>Java Message Service</i> specification (Version 1.1 April 12,
+ * 2002).
*/
public class TypedProperties {
@@ -498,8 +497,8 @@ public class TypedProperties {
}
/**
- * Performs a search among the valid key properties contained in {@code buffer}, starting from {@code from}
- * assuming it to be a valid encoded {@link TypedProperties} content.
+ * Performs a search among the valid key properties contained in {@code buffer}, starting from {@code from} assuming
+ * it to be a valid encoded {@link TypedProperties} content.
*
* @throws IllegalStateException if any not-valid property is found while searching the {@code key} property
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/UpdatableIterator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/UpdatableIterator.java
index d475ddf7e3..087542f60b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/UpdatableIterator.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/collections/UpdatableIterator.java
@@ -30,8 +30,7 @@ public class UpdatableIterator<E> implements ResettableIterator<E>, RepeatableIt
}
/**
- * This can be called by another thread.
- * It sets a new iterator, that will be picked up on the next reset.
+ * This can be called by another thread. It sets a new iterator, that will be picked up on the next reset.
*
* @param iterator the new iterator to update to.
*/
@@ -46,12 +45,12 @@ public class UpdatableIterator<E> implements ResettableIterator<E>, RepeatableIt
*/
/**
- * When reset is called, then if a new iterator has been provided by another thread via update method,
- * then we switch over to using the new iterator.
- *
- * It is important that on nulling off the changedIterator, we atomically compare and set as the
- * changedIterator could be further updated by another thread whilst we are resetting,
- * the subsequent update simply would be picked up on the next reset.
+ * When reset is called, then if a new iterator has been provided by another thread via update method, then we switch
+ * over to using the new iterator.
+ * <p>
+ * It is important that on nulling off the changedIterator, we atomically compare and set as the changedIterator
+ * could be further updated by another thread whilst we are resetting, the subsequent update simply would be picked
+ * up on the next reset.
*/
@Override
public void reset() {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
index 00599b3dcd..0e41034de9 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalAnalyzerImpl.java
@@ -44,7 +44,8 @@ public class CriticalAnalyzerImpl implements CriticalAnalyzer {
public CriticalAnalyzerImpl() {
// this will make the scheduled component to start its own pool
- /* Important: The scheduled component should have its own thread pool...
+ /*
+ * Important: The scheduled component should have its own thread pool...
* otherwise in case of a deadlock, or a starvation of the server the analyzer won't pick up any
* issues and won't be able to shutdown the server or halt the VM
*/
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
index d02a80aec4..f818091dde 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalCloseable.java
@@ -20,11 +20,12 @@ import org.apache.activemq.artemis.utils.ArtemisCloseable;
public interface CriticalCloseable extends ArtemisCloseable {
-
- /** This will set something to be called right before closing.
- *
- * The use case that drove this call was a ReadWriteLock on the journal.
- * Imagine that you need to call enterCritical, readWrite.lock() and then unlock and leaveCritical.
- * By using this call I could reuse the same instance on the readWriteLock. */
+ /**
+ * This will set something to be called right before closing.
+ * <p>
+ * The use case that drove this call was a ReadWriteLock on the journal. Imagine that you need to call enterCritical,
+ * readWrite.lock() and then unlock and leaveCritical. By using this call I could reuse the same instance on the
+ * readWriteLock.
+ */
void beforeClose(ArtemisCloseable otherCloseable);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
index b28d9b9470..5db5fb5aa4 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponent.java
@@ -17,12 +17,11 @@
package org.apache.activemq.artemis.utils.critical;
/**
- * A Critical component enters and leaves a critical state.
- * You update a long every time you enter a critical path
- * you update a different long with a System.nanoTime every time you leave that path.
- *
- * If the enterCritical > leaveCritical at any point, then you need to measure the timeout.
- * if the system stops responding, then you have something irresponsive at the system.
+ * A Critical component enters and leaves a critical state. You update a long every time you enter a critical path you
+ * update a different long with a System.nanoTime every time you leave that path.
+ * <p>
+ * If the enterCritical > leaveCritical at any point, then you need to measure the timeout. if the system stops
+ * responding, then you have something irresponsive at the system.
*/
public interface CriticalComponent {
@@ -32,8 +31,9 @@ public interface CriticalComponent {
/**
* Check if the component is expired at a given timeout.. on any of its paths.
+ *
* @param timeout - the timeout to check if the component is expired
- * @param reset - true to reset the component timer if it is expired
+ * @param reset - true to reset the component timer if it is expired
* @return -1 if it's ok, or the number of the path it failed
*/
boolean checkExpiration(long timeout, boolean reset);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
index ea08ce4bbc..9daa4763c8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/CriticalComponentImpl.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.utils.critical;
/**
- * This is not abstract as it could be used through aggregations or extensions.
- * This is only good for cases where you call leave within the same thread as you called enter.
+ * This is not abstract as it could be used through aggregations or extensions. This is only good for cases where you
+ * call leave within the same thread as you called enter.
*/
public class CriticalComponentImpl implements CriticalComponent {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
index 86e016368e..8afd521d73 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/MpscPool.java
@@ -23,13 +23,10 @@ import java.util.function.Supplier;
import io.netty.util.internal.PlatformDependent;
-
/**
- * A simple encapsulation of Netty MpscQueue to provide a pool of objects.
- * Use this pool only when the borrowing of object (consume) is done on a single thread.
- * This is using a Multi Producer Single Consumer queue (MPSC).
- * If you need other uses you may create different strategies for ObjectPooling.
- * @param <T>
+ * A simple encapsulation of Netty MpscQueue to provide a pool of objects. Use this pool only when the borrowing of
+ * object (consume) is done on a single thread. This is using a Multi Producer Single Consumer queue (MPSC). If you need
+ * other uses you may create different strategies for ObjectPooling.
*/
public class MpscPool<T> extends Pool<T> {
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/Pool.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/Pool.java
index 8f9340efb3..490250fcb8 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/Pool.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/pools/Pool.java
@@ -23,7 +23,6 @@ import java.util.function.Supplier;
/**
* A simple encapsulation to provide a pool of objects.
- * @param <T>
*/
public abstract class Pool<T> {
@@ -40,7 +39,9 @@ public abstract class Pool<T> {
abstract Queue<T> createQueue(int maxSize);
- /** Use this to instantiate or return objects from the pool */
+ /**
+ * Use this to instantiate or return objects from the pool
+ */
public final T borrow() {
if (internalPool == null) {
return supplier.get();
@@ -57,7 +58,9 @@ public abstract class Pool<T> {
return returnObject;
}
- /** Return objects to the pool, they will be either reused or ignored by the max size */
+ /**
+ * Return objects to the pool, they will be either reused or ignored by the max size
+ */
public final void release(T object) {
if (internalPool != null) {
internalPool.offer(object);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URIFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URIFactory.java
index 682bcfee70..1e12b81777 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URIFactory.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URIFactory.java
@@ -96,16 +96,14 @@ public class URIFactory<T, P> {
return schemaFactory.newURI(bean);
}
- /*
- * this method is used to change a string with multiple URI's in it into a valid URI.
- * for instance it is possible to have the following String
- * (tcp://localhost:61616,tcp://localhost:5545,tcp://localhost:5555)?somequery
- * This is an invalid URI so will be changed so that the first URI is used and the
- * extra ones added as part of the URI fragment, like so
- * tcp://localhost:61616?someQuery#tcp://localhost:5545,tcp://localhost:5555.
- *
- * It is the job of the URISchema implementation to handle these fragments as needed.
- * */
+ /**
+ * this method is used to change a string with multiple URI's in it into a valid URI. for instance it is possible to
+ * have the following String {@literal (tcp://localhost:61616,tcp://localhost:5545,tcp://localhost:5555)?somequery}
+ * This is an invalid URI so will be changed so that the first URI is used and the extra ones added as part of the
+ * URI fragment, like so {@literal tcp://localhost:61616?someQuery#tcp://localhost:5545,tcp://localhost:5555}.
+ * <p>
+ * It is the job of the URISchema implementation to handle these fragments as needed.
+ */
private URI normalise(String uri) throws URISyntaxException {
if (uri.startsWith("(")) {
String[] split = uri.split("\\)", 2);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
index 4f83398eec..3d4c413333 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
@@ -72,8 +72,8 @@ public abstract class URISchema<T, P> {
}
/**
- * It will create a new Object for the URI selected schema.
- * the propertyOverrides is used to replace whatever was defined on the URL string
+ * It will create a new Object for the URI selected schema. the propertyOverrides is used to replace whatever was
+ * defined on the URL string
*
* @param uri The URI
* @param propertyOverrides used to replace whatever was defined on the URL string
@@ -87,8 +87,7 @@ public abstract class URISchema<T, P> {
protected abstract T internalNewObject(URI uri, Map<String, String> query, P param) throws Exception;
/**
- * This is the default implementation.
- * Sub classes are should provide a proper implementation for their schemas.
+ * This is the default implementation. Sub classes are should provide a proper implementation for their schemas.
*/
protected URI internalNewURI(T bean) throws Exception {
String query = BeanSupport.getData(null, bean);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
index 1dc2098e8a..e9edae5031 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISupport.java
@@ -31,17 +31,17 @@ import org.apache.activemq.artemis.api.core.SimpleString;
/**
* Utility class that provides methods for parsing URI's
- *
- * This class can be used to split composite URI's into their component parts and is used to extract any
- * URI options from each URI in order to set specific properties on Beans.
- *
- * (copied from activemq 5)
+ * <p>
+ * This class can be used to split composite URI's into their component parts and is used to extract any URI options
+ * from each URI in order to set specific properties on Beans.
+ * <p>
+ * (copied from ActiveMQ Classic)
*/
public class URISupport {
/**
- * A composite URI can be split into one or more CompositeData object which each represent the
- * individual URIs that comprise the composite one.
+ * A composite URI can be split into one or more CompositeData object which each represent the individual URIs that
+ * comprise the composite one.
*/
public static class CompositeData {
@@ -121,7 +121,7 @@ public class URISupport {
* Give a URI break off any URI options and store them in a Key / Value Mapping.
*
* @param uri The URI whose query should be extracted and processed.
- * @return A Mapping of the URI options.
+ * @return A Mapping of the URI options
*/
public static Map<String, String> parseQuery(String uri) {
uri = uri.substring(uri.lastIndexOf("?") + 1); // get only the relevant part of the query
@@ -155,13 +155,12 @@ public class URISupport {
/**
* Given a URI parse and extract any URI query options and return them as a Key / Value mapping.
- *
- * This method differs from the {@link URISupport#parseQuery(String)} method in that it handles composite URI types and
- * will extract the URI options from the outermost composite URI.
+ * <p>
+ * This method differs from the {@link URISupport#parseQuery(String)} method in that it handles composite URI types
+ * and will extract the URI options from the outermost composite URI.
*
* @param uri The URI whose query should be extracted and processed.
- * @return A Mapping of the URI options.
- * @throws java.net.URISyntaxException
+ * @return A Mapping of the URI options
*/
public static Map<String, String> parseParameters(URI uri) throws URISyntaxException {
if (!isCompositeURI(uri)) {
@@ -190,8 +189,7 @@ public class URISupport {
*
* @param uri The source URI that will have the Map entries appended as a URI query value.
* @param queryParameters The Key / Value mapping that will be transformed into a URI query string.
- * @return A new URI value that combines the given URI and the constructed query string.
- * @throws java.net.URISyntaxException
+ * @return A new URI value that combines the given URI and the constructed query string
*/
public static URI applyParameters(URI uri, Map<String, String> queryParameters) throws URISyntaxException {
return applyParameters(uri, queryParameters, "");
@@ -205,8 +203,7 @@ public class URISupport {
* @param uri The source URI that will have the Map entries appended as a URI query value.
* @param queryParameters The Key / Value mapping that will be transformed into a URI query string.
* @param optionPrefix A string value that when not null or empty is used to prefix each query option key.
- * @return A new URI value that combines the given URI and the constructed query string.
- * @throws java.net.URISyntaxException
+ * @return A new URI value that combines the given URI and the constructed query string
*/
public static URI applyParameters(URI uri,
Map<String, String> queryParameters,
@@ -235,8 +232,7 @@ public class URISupport {
* Removes any URI query from the given uri and return a new URI that does not contain the query portion.
*
* @param uri The URI whose query value is to be removed.
- * @return a new URI that does not contain a query value.
- * @throws java.net.URISyntaxException
+ * @return a new URI that does not contain a query value
*/
public static URI removeQuery(URI uri) throws URISyntaxException {
return createURIWithQuery(uri, null);
@@ -247,8 +243,7 @@ public class URISupport {
*
* @param uri The source URI whose existing query is replaced with the newly supplied one.
* @param query The new URI query string that should be appended to the given URI.
- * @return a new URI that is a combination of the original URI and the given query string.
- * @throws java.net.URISyntaxException
+ * @return a new URI that is a combination of the original URI and the given query string
*/
public static URI createURIWithQuery(URI uri, String query) throws URISyntaxException {
String schemeSpecificPart = uri.getRawSchemeSpecificPart();
@@ -268,12 +263,11 @@ public class URISupport {
}
/**
- * Given a composite URI, parse the individual URI elements contained within that URI and return
- * a CompositeData instance that contains the parsed URI values.
+ * Given a composite URI, parse the individual URI elements contained within that URI and return a CompositeData
+ * instance that contains the parsed URI values.
*
* @param uri The target URI that should be parsed.
- * @return a new CompositeData instance representing the parsed composite URI.
- * @throws java.net.URISyntaxException
+ * @return a new CompositeData instance representing the parsed composite URI
*/
public static CompositeData parseComposite(URI uri) throws URISyntaxException {
@@ -291,7 +285,7 @@ public class URISupport {
* Examine a URI and determine if it is a Composite type or not.
*
* @param uri The URI that is to be examined.
- * @return true if the given URI is a Composite type.
+ * @return true if the given URI is a Composite type
*/
public static boolean isCompositeURI(URI uri) {
String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim();
@@ -307,7 +301,7 @@ public class URISupport {
*
* @param str The string to be searched for a matching parend.
* @param first The index in the string of the opening parend whose close value is to be searched.
- * @return the index in the string where the closing parend is located.
+ * @return the index in the string where the closing parend is located
* @throws java.net.URISyntaxException fi the string does not contain a matching parend.
*/
public static int indexOfParenthesisMatch(String str, int first) throws URISyntaxException {
@@ -343,13 +337,12 @@ public class URISupport {
/**
* Given a composite URI and a CompositeData instance and the scheme specific part extracted from the source URI,
- * parse the composite URI and populate the CompositeData object with the results. The source URI is used only
- * for logging as the ssp should have already been extracted from it and passed here.
+ * parse the composite URI and populate the CompositeData object with the results. The source URI is used only for
+ * logging as the ssp should have already been extracted from it and passed here.
*
* @param uri The original source URI whose ssp is parsed into the composite data.
* @param rc The CompositeData instance that will be populated from the given ssp.
* @param ssp The scheme specific part from the original string that is a composite or one or more URIs.
- * @throws java.net.URISyntaxException
*/
private static void parseComposite(URI uri, CompositeData rc, String ssp) throws URISyntaxException {
String componentString;
@@ -401,11 +394,11 @@ public class URISupport {
}
/**
- * Given the inner portion of a composite URI, split and return each inner URI as a string
- * element in a new String array.
+ * Given the inner portion of a composite URI, split and return each inner URI as a string element in a new String
+ * array.
*
* @param str The inner URI elements of a composite URI string.
- * @return an array containing each inner URI from the composite one.
+ * @return an array containing each inner URI from the composite one
*/
private static String[] splitComponents(String str) {
List<String> l = new ArrayList<>();
@@ -447,7 +440,7 @@ public class URISupport {
*
* @param value The string that should be trimmed of the given prefix if present.
* @param prefix The prefix to remove from the target string.
- * @return either the original string or a new string minus the supplied prefix if present.
+ * @return either the original string or a new string minus the supplied prefix if present
*/
public static String stripPrefix(String value, String prefix) {
if (value.startsWith(prefix)) {
@@ -460,19 +453,18 @@ public class URISupport {
* Strip a URI of its scheme element.
*
* @param uri The URI whose scheme value should be stripped.
- * @return The stripped URI value.
- * @throws java.net.URISyntaxException
+ * @return The stripped URI value
*/
public static URI stripScheme(URI uri) throws URISyntaxException {
return new URI(stripPrefix(uri.getSchemeSpecificPart().trim(), "//"));
}
/**
- * Given a key / value mapping, create and return a URI formatted query string that is valid and
- * can be appended to a URI. Query parameters in the string are sorted by key.
+ * Given a key / value mapping, create and return a URI formatted query string that is valid and can be appended to a
+ * URI. Query parameters in the string are sorted by key.
*
* @param options The Mapping that will create the new Query string.
- * @return a URI formatted query string.
+ * @return a URI formatted query string
*/
public static String createQueryString(Map<String, ? extends Object> options) {
if (!options.isEmpty()) {
@@ -500,16 +492,14 @@ public class URISupport {
/**
* Creates a URI from the original URI and the remaining parameters.
- *
- * When the query options of a URI are applied to certain objects the used portion of the query options needs
- * to be removed and replaced with those that remain so that other parts of the code can attempt to apply the
- * remainder or give an error is unknown values were given. This method is used to update a URI with those
- * remainder values.
+ * <p>
+ * When the query options of a URI are applied to certain objects the used portion of the query options needs to be
+ * removed and replaced with those that remain so that other parts of the code can attempt to apply the remainder or
+ * give an error is unknown values were given. This method is used to update a URI with those remainder values.
*
* @param originalURI The URI whose current parameters are remove and replaced with the given remainder value.
* @param params The URI params that should be used to replace the current ones in the target.
- * @return a new URI that matches the original one but has its query options replaced with the given ones.
- * @throws java.net.URISyntaxException
+ * @return a new URI that matches the original one but has its query options replaced with the given ones
*/
public static URI createRemainingURI(URI originalURI, Map<String, String> params) throws URISyntaxException {
String s = createQueryString(params);
@@ -520,13 +510,12 @@ public class URISupport {
}
/**
- * Given a URI value create and return a new URI that matches the target one but with the scheme value
- * supplied to this method.
+ * Given a URI value create and return a new URI that matches the target one but with the scheme value supplied to
+ * this method.
*
* @param bindAddr The URI whose scheme value should be altered.
* @param scheme The new scheme value to use for the returned URI.
- * @return a new URI that is a copy of the original except that its scheme matches the supplied one.
- * @throws java.net.URISyntaxException
+ * @return a new URI that is a copy of the original except that its scheme matches the supplied one
*/
public static URI changeScheme(URI bindAddr, String scheme) throws URISyntaxException {
return new URI(scheme, bindAddr.getUserInfo(), bindAddr.getHost(), bindAddr.getPort(), bindAddr.getPath(), bindAddr.getQuery(), bindAddr.getFragment());
@@ -536,7 +525,7 @@ public class URISupport {
* Examine the supplied string and ensure that all parens appear as matching pairs.
*
* @param str The target string to examine.
- * @return true if the target string has valid paren pairings.
+ * @return true if the target string has valid paren pairings
*/
public static boolean checkParenthesis(String str) {
boolean result = true;
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
index 5248f5ba48..1cd92304ac 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/URIParserTest.java
@@ -34,8 +34,6 @@ public class URIParserTest {
/**
* this is just a simple test to validate the model
- *
- * @throws Throwable
*/
@Test
public void testSchemaFruit() throws Throwable {
@@ -53,8 +51,6 @@ public class URIParserTest {
/**
* this is just a simple test to validate the model
- *
- * @throws Throwable
*/
@Test
public void testGenerateWithEncoding() throws Throwable {
@@ -74,8 +70,6 @@ public class URIParserTest {
/**
* Even thought there's no host Property on FruitBase.. this should still work fine without throwing any exceptions
- *
- * @throws Throwable
*/
@Test
public void testSchemaNoHosProperty() throws Throwable {
@@ -88,8 +82,6 @@ public class URIParserTest {
/**
* Even thought there's no host Property on FruitBase.. this should still work fine without throwing any exceptions
- *
- * @throws Throwable
*/
@Test
public void testSchemaNoHostOnURL() throws Throwable {
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/ThresholdActorTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/ThresholdActorTest.java
index 4a5d8d3588..07b2749e84 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/ThresholdActorTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/actors/ThresholdActorTest.java
@@ -142,9 +142,8 @@ public class ThresholdActorTest {
}
/**
- * This test will actually not respect the semaphore and keep going.
- * The blockers and unblocks should still perform ok.
- * @throws Exception
+ * This test will actually not respect the semaphore and keep going. The blockers and unblocks should still perform
+ * ok.
*/
@Test
public void testFlow2() throws Exception {
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/collections/LongHashSetTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/collections/LongHashSetTest.java
index a953fbab17..ee92f3e133 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/collections/LongHashSetTest.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/collections/LongHashSetTest.java
@@ -34,8 +34,9 @@ import java.util.Set;
import org.junit.jupiter.api.Test;
/**
- * These tests are based on <a href="https://github.com/real-logic/agrona/blob/master/agrona/src/test/java/org/agrona/collections/IntHashSetTest.java">Agrona IntHashSetTest</a>
- * to guarantee a similar coverage to what's provided for a similar collection.
+ * These tests are based on <a
+ * href="https://github.com/real-logic/agrona/blob/master/agrona/src/test/java/org/agrona/collections/IntHashSetTest.java">Agrona
+ * IntHashSetTest</a> to guarantee a similar coverage to what's provided for a similar collection.
*/
public class LongHashSetTest {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index bb3033ee68..18a76a0e19 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -101,14 +101,11 @@ public final class ActiveMQDefaultConfiguration {
}
//shared by client and core/server
- // XXX not on schema?
private static long DEFAULT_CLIENT_FAILURE_CHECK_PERIOD = 30000;
- // XXX not on schema?
private static long DEFAULT_FILE_DEPLOYER_SCAN_PERIOD = 5000;
- // These defaults are applied depending on whether the journal type
- // is NIO or AIO.
+ // These defaults are applied depending on whether the journal type is NIO or AIO.
private static int DEFAULT_JOURNAL_MAX_IO_AIO = 4096;
private static int DEFAULT_JOURNAL_POOL_FILES = -1;
private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO = ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_AIO;
@@ -117,7 +114,6 @@ public final class ActiveMQDefaultConfiguration {
private static int DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO = ArtemisConstants.DEFAULT_JOURNAL_BUFFER_TIMEOUT_NIO;
private static int DEFAULT_JOURNAL_BUFFER_SIZE_NIO = ArtemisConstants.DEFAULT_JOURNAL_BUFFER_SIZE_NIO;
- // XXX not on schema.
//properties passed to acceptor/connectors.
private static String PROP_MASK_PASSWORD = "activemq.usemaskedpassword";
private static String PROP_PASSWORD_CODEC = "activemq.passwordcodec";
@@ -713,21 +709,23 @@ public final class ActiveMQDefaultConfiguration {
private static final boolean DEFAULT_MIRROR_PAGE_TRANSACTION = false;
/**
- * If true then the ActiveMQ Artemis Server will make use of any Protocol Managers that are in available on the classpath. If false then only the core protocol will be available, unless in Embedded mode where users can inject their own Protocol Managers.
+ * If {@code true} then the ActiveMQ Artemis Server will make use of any Protocol Managers that are in available on
+ * the classpath. If false then only the core protocol will be available, unless in Embedded mode where users can
+ * inject their own Protocol Managers.
*/
public static boolean isDefaultResolveProtocols() {
return DEFAULT_RESOLVE_PROTOCOLS;
}
/**
- * true means that the server will load configuration from the configuration files
+ * {@code true} means that the server will load configuration from the configuration files
*/
public static boolean isDefaultFileDeploymentEnabled() {
return DEFAULT_FILE_DEPLOYMENT_ENABLED;
}
/**
- * true means that the server will use the file based journal for persistence.
+ * {@code true} means that the server will use the file based journal for persistence.
*/
public static boolean isDefaultPersistenceEnabled() {
return DEFAULT_PERSISTENCE_ENABLED;
@@ -756,21 +754,21 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that security is enabled
+ * {@code true} means that security is enabled
*/
public static boolean isDefaultSecurityEnabled() {
return DEFAULT_SECURITY_ENABLED;
}
/**
- * true means that graceful shutdown is enabled
+ * {@code true} means that graceful shutdown is enabled
*/
public static boolean isDefaultGracefulShutdownEnabled() {
return DEFAULT_GRACEFUL_SHUTDOWN_ENABLED;
}
/**
- * true means that graceful shutdown is enabled
+ * {@code true} means that graceful shutdown is enabled
*/
public static long getDefaultGracefulShutdownTimeout() {
return DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT;
@@ -805,7 +803,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that the server supports wild card routing
+ * {@code true} means that the server supports wild card routing
*/
public static boolean isDefaultWildcardRoutingEnabled() {
return DEFAULT_WILDCARD_ROUTING_ENABLED;
@@ -816,7 +814,8 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * the name of the management address to send management messages to. It is prefixed with "jms.queue" so that JMS clients can send messages to it.
+ * the name of the management address to send management messages to. It is prefixed with "jms.queue" so that JMS
+ * clients can send messages to it.
*/
public static SimpleString getDefaultManagementAddress() {
return DEFAULT_MANAGEMENT_ADDRESS;
@@ -865,14 +864,15 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * This option controls whether passwords in server configuration need be masked. If set to "true" the passwords are masked.
+ * This option controls whether passwords in server configuration need be masked. If set to "true" the passwords are
+ * masked.
*/
public static Boolean isDefaultMaskPassword() {
return DEFAULT_MASK_PASSWORD;
}
/**
- * true means that the management API is available via JMX
+ * {@code true} means that the management API is available via JMX
*/
public static boolean isDefaultJmxManagementEnabled() {
return DEFAULT_JMX_MANAGEMENT_ENABLED;
@@ -890,7 +890,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that message counters are enabled
+ * {@code true} means that message counters are enabled
*/
public static boolean isDefaultMessageCounterEnabled() {
return DEFAULT_MESSAGE_COUNTER_ENABLED;
@@ -911,14 +911,16 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this setting.
+ * if set, this will override how long (in ms) to keep a connection alive without receiving a ping. -1 disables this
+ * setting.
*/
public static long getDefaultConnectionTtlOverride() {
return DEFAULT_CONNECTION_TTL_OVERRIDE;
}
/**
- * should certain incoming packets on the server be handed off to a thread from the thread pool for processing or should they be handled on the remoting thread?
+ * should certain incoming packets on the server be handed off to a thread from the thread pool for processing or
+ * should they be handled on the remoting thread?
*/
public static boolean isDefaultAsyncConnectionExecutionEnabled() {
return DEFAULT_ASYNC_CONNECTION_EXECUTION_ENABLED;
@@ -973,14 +975,15 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that ID's are persisted to the journal
+ * {@code true} means that ID's are persisted to the journal
*/
public static boolean isDefaultPersistIdCache() {
return DEFAULT_PERSIST_ID_CACHE;
}
/**
- * True means that the delivery count is persisted before delivery. False means that this only happens after a message has been cancelled.
+ * {@code true} means that the delivery count is persisted before delivery. False means that this only happens after
+ * a message has been cancelled.
*/
public static boolean isDefaultPersistDeliveryCountBeforeDelivery() {
return DEFAULT_PERSIST_DELIVERY_COUNT_BEFORE_DELIVERY;
@@ -1001,7 +1004,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that the server will create the bindings directory on start up
+ * {@code true} means that the server will create the bindings directory on start up
*/
public static boolean isDefaultCreateBindingsDir() {
return DEFAULT_CREATE_BINDINGS_DIR;
@@ -1034,14 +1037,14 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * true means that the journal directory will be created
+ * {@code true} means that the journal directory will be created
*/
public static boolean isDefaultCreateJournalDir() {
return DEFAULT_CREATE_JOURNAL_DIR;
}
/**
- * if true wait for transaction data to be synchronized to the journal before returning response to client
+ * if {@code true} wait for transaction data to be synchronized to the journal before returning response to client
*/
public static boolean isDefaultJournalSyncTransactional() {
return DEFAULT_JOURNAL_SYNC_TRANSACTIONAL;
@@ -1052,7 +1055,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * if true wait for non transaction data to be synced to the journal before returning response to client.
+ * if {@code true} wait for non transaction data to be synced to the journal before returning response to client.
*/
public static boolean isDefaultJournalSyncNonTransactional() {
return DEFAULT_JOURNAL_SYNC_NON_TRANSACTIONAL;
@@ -1081,8 +1084,6 @@ public final class ActiveMQDefaultConfiguration {
/**
* How many journal files can be resued
- *
- * @return
*/
public static int getDefaultJournalPoolFiles() {
return DEFAULT_JOURNAL_POOL_FILES;
@@ -1149,14 +1150,16 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Period the discovery group waits after receiving the last broadcast from a particular server before removing that servers connector pair entry from its list.
+ * Period the discovery group waits after receiving the last broadcast from a particular server before removing that
+ * servers connector pair entry from its list.
*/
public static int getDefaultBroadcastRefreshTimeout() {
return DEFAULT_BROADCAST_REFRESH_TIMEOUT;
}
/**
- * how long to keep a connection alive in the absence of any data arriving from the client. This should be greater than the ping period.
+ * how long to keep a connection alive in the absence of any data arriving from the client. This should be greater
+ * than the ping period.
*/
public static long getDefaultConnectionTtl() {
return DEFAULT_CONNECTION_TTL;
@@ -1212,14 +1215,16 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Upon reconnection this configures the number of time the same node on the topology will be retried before reseting the server locator and using the initial connectors
+ * Upon reconnection this configures the number of time the same node on the topology will be retried before reseting
+ * the server locator and using the initial connectors
*/
public static int getDefaultBridgeConnectSameNode() {
return DEFAULT_BRIDGE_CONNECT_SAME_NODE;
}
/**
- * The period (in milliseconds) used to check if the cluster connection has failed to receive pings from another server
+ * The period (in milliseconds) used to check if the cluster connection has failed to receive pings from another
+ * server
*/
public static long getDefaultClusterFailureCheckPeriod() {
return DEFAULT_CLUSTER_FAILURE_CHECK_PERIOD;
@@ -1349,7 +1354,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * If true then the server will request a backup on another node
+ * If {@code true} then the server will request a backup on another node
*/
public static boolean isDefaultHapolicyRequestBackup() {
return DEFAULT_HAPOLICY_REQUEST_BACKUP;
@@ -1370,7 +1375,7 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Whether or not this server will accept backup requests from other servers.
+ * Whether this server will accept backup requests from other servers.
*/
public static int getDefaultHapolicyMaxBackups() {
return DEFAULT_HAPOLICY_MAX_BACKUPS;
@@ -1384,14 +1389,17 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Whether to check the cluster for an active server using our own server ID when starting up. This option is only necessary for performing 'fail-back' on replicating servers. Strictly speaking this setting only applies to primary servers and not to backups.
+ * Whether to check the cluster for an active server using our own server ID when starting up. This option is only
+ * necessary for performing 'fail-back' on replicating servers. Strictly speaking this setting only applies to
+ * primary servers and not to backups.
*/
public static boolean isDefaultCheckForActiveServer() {
return DEFAULT_CHECK_FOR_ACTIVE_SERVER;
}
/**
- * This specifies how many times a replicated backup server can restart after moving its files on start. Once there are this number of backup journal files the server will stop permanently after if fails back.
+ * This specifies how many times a replicated backup server can restart after moving its files on start. Once there
+ * are this number of backup journal files the server will stop permanently after if fails back.
*/
public static int getDefaultMaxSavedReplicatedJournalsSize() {
return DEFAULT_MAX_SAVED_REPLICATED_JOURNALS_SIZE;
@@ -1405,7 +1413,9 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Whether a server will automatically stop when another places a request to take over its place. The use case is when a regular server stops and its backup takes over its duties, later the main server restarts and requests the server (the former backup) to stop operating.
+ * Whether a server will automatically stop when another places a request to take over its place. The use case is
+ * when a regular server stops and its backup takes over its duties, later the main server restarts and requests the
+ * server (the former backup) to stop operating.
*/
public static boolean isDefaultAllowAutoFailback() {
return DEFAULT_ALLOW_AUTO_FAILBACK;
@@ -1454,7 +1464,8 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * its possible that you only want a server to partake in scale down as a receiver, via a group. In this case set scale-down to false
+ * its possible that you only want a server to partake in scale down as a receiver, via a group. In this case set
+ * scale-down to false
*/
public static boolean isDefaultScaleDownEnabled() {
return DEFAULT_SCALE_DOWN_ENABLED;
@@ -1468,7 +1479,9 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * How long a group binding will be used, -1 means for ever. Bindings are removed after this wait elapses. On the remote node this is used to determine how often you should re-query the main coordinator in order to update the last time used accordingly.
+ * How long a group binding will be used, -1 means for ever. Bindings are removed after this wait elapses. On the
+ * remote node this is used to determine how often you should re-query the main coordinator in order to update the
+ * last time used accordingly.
*/
public static int getDefaultGroupingHandlerGroupTimeout() {
return DEFAULT_GROUPING_HANDLER_GROUP_TIMEOUT;
@@ -1765,7 +1778,8 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * The period (in milliseconds) used to check if the federation connection has failed to receive pings from another server
+ * The period (in milliseconds) used to check if the federation connection has failed to receive pings from another
+ * server
*/
public static long getDefaultFederationFailureCheckPeriod() {
return DEFAULT_FEDERATION_FAILURE_CHECK_PERIOD;
@@ -1828,21 +1842,21 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Whether or not to report JVM memory metrics
+ * Whether to report JVM memory metrics
*/
public static boolean getDefaultJvmMemoryMetrics() {
return DEFAULT_JVM_MEMORY_METRICS;
}
/**
- * Whether or not to report JVM GC metrics
+ * Whether to report JVM GC metrics
*/
public static boolean getDefaultJvmGcMetrics() {
return DEFAULT_JVM_GC_METRICS;
}
/**
- * Whether or not to report JVM thread metrics
+ * Whether to report JVM thread metrics
*/
public static boolean getDefaultJvmThreadMetrics() {
return DEFAULT_JVM_THREAD_METRICS;
@@ -1865,42 +1879,42 @@ public final class ActiveMQDefaultConfiguration {
}
/**
- * Whether or not to report Netty pool metrics
+ * Whether to report Netty pool metrics
*/
public static Boolean getDefaultNettyPoolMetrics() {
return DEFAULT_NETTY_POOL_METRICS;
}
/**
- * Whether or not to report file descriptor metrics
+ * Whether to report file descriptor metrics
*/
public static Boolean getDefaultFileDescriptorsMetrics() {
return DEFAULT_FILE_DESCRIPTORS_METRICS;
}
/**
- * Whether or not to report processor metrics
+ * Whether to report processor metrics
*/
public static Boolean getDefaultProcessorMetrics() {
return DEFAULT_PROCESSOR_METRICS;
}
/**
- * Whether or not to report uptime metrics
+ * Whether to report uptime metrics
*/
public static Boolean getDefaultUptimeMetrics() {
return DEFAULT_UPTIME_METRICS;
}
/**
- * Whether or not to report logging metrics
+ * Whether to report logging metrics
*/
public static Boolean getDefaultLoggingMetrics() {
return DEFAULT_LOGGING_METRICS;
}
/**
- * Whether or not to report security cache metrics
+ * Whether to report security cache metrics
*/
public static Boolean getDefaultSecurityCacheMetrics() {
return DEFAULT_SECURITY_CACHE_METRICS;
@@ -1945,9 +1959,11 @@ public final class ActiveMQDefaultConfiguration {
}
- /** This configures the Mirror Ack Manager number of attempts on queues before trying page acks.
- * It is not intended to be configured through the XML.
- * The default value here is 5. */
+ /*
+ * This configures the Mirror Ack Manager number of attempts on queues before trying page acks.
+ * It is not intended to be configured through the XML.
+ * The default value here is 5.
+ */
public static int getMirrorAckManagerQueueAttempts() {
return DEFAULT_MIRROR_ACK_MANAGER_QUEUE_ATTEMPTS;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BaseInterceptor.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BaseInterceptor.java
index 200e6b5d03..4141562bf0 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BaseInterceptor.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BaseInterceptor.java
@@ -26,9 +26,8 @@ public interface BaseInterceptor<P> {
*
* @param packet the packet being received
* @param connection the connection the packet was received on
- * @return {@code true} to process the next interceptor and handle the packet,
- * {@code false} to abort processing of the packet
- * @throws ActiveMQException
+ * @return {@code true} to process the next interceptor and handle the packet, {@code false} to abort processing of
+ * the packet
*/
boolean intercept(P packet, RemotingConnection connection) throws ActiveMQException;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
index 7a275a478b..5ff991c063 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastEndpoint.java
@@ -39,29 +39,21 @@ import java.util.concurrent.TimeUnit;
public interface BroadcastEndpoint {
/**
- * This method initializes a BroadcastEndpoint as
- * a receiving end for broadcasts. After that data can be
- * received using one of its receiveBroadcast() methods.
- *
- * @throws Exception
+ * This method initializes a BroadcastEndpoint as a receiving end for broadcasts. After that data can be received
+ * using one of its receiveBroadcast() methods.
*/
void openClient() throws Exception;
/**
- * This method initializes a BroadcastEndpint as
- * a broadcaster. After that data can be sent
- * via its broadcast() method.
- *
- * @throws Exception
+ * This method initializes a BroadcastEndpint as a broadcaster. After that data can be sent via its broadcast()
+ * method.
*/
void openBroadcaster() throws Exception;
/**
- * Close the endpoint. Any related resources should
- * be cleaned up in this method.
+ * Close the endpoint. Any related resources should be cleaned up in this method.
*
* @param isBroadcast : indicates whether this endpoint serves as a broadcast or not.
- * @throws Exception
*/
void close(boolean isBroadcast) throws Exception;
@@ -69,7 +61,6 @@ public interface BroadcastEndpoint {
* Broadcasting data to the cluster.
*
* @param data : a byte array containing the data.
- * @throws Exception
*/
void broadcast(byte[] data) throws Exception;
@@ -77,20 +68,17 @@ public interface BroadcastEndpoint {
* Receives the broadcast data. It blocks until data is
* available.
*
- * @return the received data as byte array.
- * @throws Exception
+ * @return the received data as byte array
*/
byte[] receiveBroadcast() throws Exception;
/**
- * Receives the broadcast data with a timeout. It blocks until either
- * the data is available or the timeout is reached, whichever comes first.
+ * Receives the broadcast data with a timeout. It blocks until either the data is available or the timeout is
+ * reached, whichever comes first.
*
* @param time : how long the method should wait for the data to arrive.
* @param unit : unit of the time.
- * @return a byte array if data is arrived within the timeout, or null if no data
- * is available after the timeout.
- * @throws Exception
+ * @return a byte array if data is arrived within the timeout, or null if no data is available after the timeout.
*/
byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
index 168d840b01..a7bc772090 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
@@ -22,8 +22,8 @@ import java.util.List;
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
/**
- * The basic configuration used to determine how the server will broadcast members
- * This is analogous to {@link DiscoveryGroupConfiguration}
+ * The basic configuration used to determine how the server will broadcast members This is analogous to
+ * {@link DiscoveryGroupConfiguration}
*/
public final class BroadcastGroupConfiguration implements Serializable {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
index 175bacfa6c..f9f5f24500 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ChannelBroadcastEndpointFactory.java
@@ -24,7 +24,7 @@ import org.jgroups.JChannel;
/**
* An implementation of BroadcastEndpointFactory that uses an externally managed JChannel for JGroups clustering.
- *
+ * <p>
* Note - the underlying JChannel is not closed in this implementation.
*/
public class ChannelBroadcastEndpointFactory implements BroadcastEndpointFactory {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
index 11985fb8a0..17bf9bb73b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/DiscoveryGroupConfiguration.java
@@ -24,11 +24,12 @@ import org.apache.activemq.artemis.utils.UUIDGenerator;
/**
* This file represents how we are using Discovery.
* <p>
- * The discovery configuration could either use plain UDP, or JGroups.<br>
- * If using UDP, all the UDP properties will be filled and the jgroups properties will be
- * {@code null}.<br>
- * If using JGroups, all the UDP properties will be -1 or {@code null} and the jgroups properties
- * will be filled.<br>
+ * The discovery configuration could either use plain UDP or JGroups.
+ * <p>
+ * If using UDP, all the UDP properties will be filled and the jgroups properties will be {@code null}.
+ * <p>
+ * If using JGroups, all the UDP properties will be -1 or {@code null} and the jgroups properties will be filled.
+ * <p>
* If by any reason, both properties are filled, the JGroups takes precedence. That means, if
* {@code jgroupsFile != null} then the Grouping method used will be JGroups.
*/
@@ -42,9 +43,7 @@ public final class DiscoveryGroupConfiguration implements Serializable {
private long discoveryInitialWaitTimeout = ActiveMQClient.DEFAULT_DISCOVERY_INITIAL_WAIT_TIMEOUT;
- /*
- * This is the actual object used by the class, it has to be transient so we can handle deserialization with a 2.2 client
- * */
+ // This is the actual object used by the class, it has to be transient so we can handle deserialization with a 2.2 client
private BroadcastEndpointFactory endpointFactory;
public DiscoveryGroupConfiguration() {
@@ -58,32 +57,20 @@ public final class DiscoveryGroupConfiguration implements Serializable {
return refreshTimeout;
}
- /**
- * @param name the name to set
- */
public DiscoveryGroupConfiguration setName(final String name) {
this.name = name;
return this;
}
- /**
- * @param refreshTimeout the refreshTimeout to set
- */
public DiscoveryGroupConfiguration setRefreshTimeout(final long refreshTimeout) {
this.refreshTimeout = refreshTimeout;
return this;
}
- /**
- * @return the discoveryInitialWaitTimeout
- */
public long getDiscoveryInitialWaitTimeout() {
return discoveryInitialWaitTimeout;
}
- /**
- * @param discoveryInitialWaitTimeout the discoveryInitialWaitTimeout to set
- */
public DiscoveryGroupConfiguration setDiscoveryInitialWaitTimeout(long discoveryInitialWaitTimeout) {
this.discoveryInitialWaitTimeout = discoveryInitialWaitTimeout;
return this;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
index d50b7217e8..97e9525a2c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
@@ -17,8 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * Constants representing pre-defined message attributes that can be referenced in ActiveMQ Artemis core
- * filter expressions.
+ * Constants representing pre-defined message attributes that can be referenced in ActiveMQ Artemis core filter
+ * expressions.
*/
public final class FilterConstants {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
index 75011229b3..1ee402dcfb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
@@ -28,7 +28,9 @@ import org.apache.activemq.artemis.core.message.impl.CoreMessage;
*/
public interface ICoreMessage extends Message {
- /** The buffer will belong to this message, until release is called. */
+ /**
+ * The buffer will belong to this message, until release is called.
+ */
Message setBuffer(ByteBuf buffer);
ByteBuf getBuffer();
@@ -41,45 +43,34 @@ public interface ICoreMessage extends Message {
InputStream getBodyInputStream();
/**
- * Returns a new Buffer slicing the current Body.
+ * {@return a new Buffer slicing the current Body}
*/
ActiveMQBuffer getReadOnlyBodyBuffer();
/**
- * Returns the length in bytes of the body buffer.
+ * {@return the length in bytes of the body buffer}
*/
int getBodyBufferSize();
/**
- * Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed.
- * or the large message buffer.
- * @return
+ * {@return a readOnlyBodyBuffer or a decompressed one if the message is compressed or the large message buffer}
*/
ActiveMQBuffer getDataBuffer();
- /**
- * Return the type of the message
- */
@Override
byte getType();
- /**
- * the type of the message
- */
@Override
CoreMessage setType(byte type);
/**
* We are really interested if this is a LargeServerMessage.
- *
- * @return
*/
boolean isServerMessage();
/**
- * The buffer to write the body.
- * Warning: If you just want to read the content of a message, use getDataBuffer() or getReadOnlyBuffer();
- * @return
+ * The buffer to write the body. Warning: If you just want to read the content of a message, use
+ * {@link #getDataBuffer()} or {@link #getReadOnlyBodyBuffer()}
*/
@Override
ActiveMQBuffer getBodyBuffer();
@@ -87,13 +78,12 @@ public interface ICoreMessage extends Message {
int getEndOfBodyPosition();
/**
- * Used on large messages treatment.
- * this method is used to transfer properties from a temporary CoreMessage to a definitive one.
- * This is used when before a Message was defined as a LargeMessages, its properties are then moved from the
- * Temporary message to its final LargeMessage object.
- *
- * Be careful as this will not perform a copy of the Properties.
- * For real copy, use the copy methods or copy constructors.
+ * Used on large messages treatment. this method is used to transfer properties from a temporary CoreMessage to a
+ * definitive one. This is used when before a Message was defined as a LargeMessages, its properties are then moved
+ * from the Temporary message to its final LargeMessage object.
+ * <p>
+ * Be careful as this will not perform a copy of the Properties. For real copy, use the copy methods or copy
+ * constructors.
*/
void moveHeadersAndProperties(Message msg);
@@ -105,8 +95,7 @@ public interface ICoreMessage extends Message {
void receiveBuffer_1X(ByteBuf buffer);
/**
- * @return Returns the message in Map form, useful when encoding to JSON
- * @param valueSizeLimit
+ * {@inheritDoc}
*/
@Override
default Map<String, Object> toMap(int valueSizeLimit) {
@@ -127,7 +116,6 @@ public interface ICoreMessage extends Message {
return map;
}
-
default boolean isConfirmed() {
return false;
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Interceptor.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Interceptor.java
index 9db3df2652..ae3ce7d002 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Interceptor.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Interceptor.java
@@ -22,8 +22,10 @@ import org.apache.activemq.artemis.core.protocol.core.Packet;
* This is class is a simple way to intercepting calls on ActiveMQ Artemis client and servers.
* <p>
* To add an interceptor to ActiveMQ Artemis server, you have to modify the server configuration file
- * {@literal broker.xml}.<br>
- * To add it to a client, use {@link org.apache.activemq.artemis.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
+ * {@literal broker.xml}.
+ * <p>
+ * To add it to a client, use
+ * {@link org.apache.activemq.artemis.api.core.client.ServerLocator#addIncomingInterceptor(Interceptor)}
*/
public interface Interceptor extends BaseInterceptor<Packet> {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
index 323a598c5e..4c1bace642 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
@@ -136,10 +136,8 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
}
/**
- * Closes the channel used in this JGroups Broadcast.
- * Can be overridden by implementations that use an externally managed channel.
- *
- * @param channel
+ * Closes the channel used in this JGroups Broadcast. Can be overridden by implementations that use an externally
+ * managed channel.
*/
protected synchronized void internalCloseChannel(JChannelWrapper channel) {
channel.close(true);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
index 2317169f33..0dff8a7ae3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
@@ -22,7 +22,7 @@ import org.jgroups.JChannel;
/**
* An implementation of JGroupsBroadcastEndpoint that uses an externally managed JChannel for its operations.
- *
+ * <p>
* Note - this implementation does not close the JChannel, since its externally created.
*/
public class JGroupsChannelBroadcastEndpoint extends JGroupsBroadcastEndpoint {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
index f7bd4d607f..7bf8fbfbd7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
@@ -31,13 +31,13 @@ import org.apache.activemq.artemis.core.persistence.Persister;
/**
* A Message is a routable instance that has a payload.
* <p>
- * The payload (the "body") is opaque to the messaging system. A Message also has a fixed set of
- * headers (required by the messaging system) and properties (defined by the users) that can be used
- * by the messaging system to route the message (e.g. to ensure it matches a queue filter).
+ * The payload (the "body") is opaque to the messaging system. A Message also has a fixed set of headers (required by
+ * the messaging system) and properties (defined by the users) that can be used by the messaging system to route the
+ * message (e.g. to ensure it matches a queue filter).
* <h2>Message Properties</h2>
* <p>
- * Message can contain properties specified by the users. It is possible to convert from some types
- * to other types as specified by the following table:
+ * Message can contain properties specified by the users. It is possible to convert from some types to other types as
+ * specified by the following table:
* <pre>
* | | boolean byte short int long float double String byte[]
* |----------------------------------------------------------------
@@ -52,25 +52,23 @@ import org.apache.activemq.artemis.core.persistence.Persister;
* |byte[] | X
* |-----------------------------------------------------------------
* </pre>
+ * If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a {@code boolean}), a
+ * {@link ActiveMQPropertyConversionException} will be thrown.
* <p>
- * If conversion is not allowed (for example calling {@code getFloatProperty} on a property set a
- * {@code boolean}), a {@link ActiveMQPropertyConversionException} will be thrown.
- *
- *
* User cases that will be covered by Message
- *
+ * <p>
* Receiving a buffer:
- *
+ * <pre>{@code
* Message encode = new CoreMessage(); // or any other implementation
* encode.receiveBuffer(buffer);
- *
- *
+ * }</pre>
+ * <p>
* Sending to a buffer:
- *
+ * <pre>{@code
* Message encode;
* size = encode.getEncodeSize();
* encode.encodeDirectly(bufferOutput);
- *
+ * }</pre>
*/
public interface Message {
@@ -155,7 +153,8 @@ public interface Message {
SimpleString HDR_LAST_VALUE_NAME = SimpleString.of("_AMQ_LVQ_NAME");
/**
- * To define the mime-type of body messages. Mainly for stomp but it could be informed on any message for user purposes.
+ * To define the mime-type of body messages. Mainly for stomp but it could be informed on any message for user
+ * purposes.
*/
SimpleString HDR_CONTENT_TYPE = SimpleString.of("_AMQ_CONTENT_TYPE");
@@ -180,8 +179,8 @@ public interface Message {
SimpleString HDR_INGRESS_TIMESTAMP = SimpleString.of("_AMQ_INGRESS_TIMESTAMP");
/**
- * The prefix used (if any) when sending this message. For protocols (e.g. STOMP) that need to track this and restore
- * the prefix when the message is consumed.
+ * The prefix used (if any) when sending this message. For protocols (e.g. STOMP) that need to track this and
+ * restore the prefix when the message is consumed.
*/
SimpleString HDR_PREFIX = SimpleString.of("_AMQ_PREFIX");
@@ -197,10 +196,15 @@ public interface Message {
byte STREAM_TYPE = 6;
- /** The message will contain another message persisted through {@literal org.apache.activemq.artemis.spi.core.protocol.EmbedMessageUtil}*/
+ /**
+ * The message will contain another message persisted through
+ * {@code org.apache.activemq.artemis.spi.core.protocol.EmbedMessageUtil}
+ */
byte EMBEDDED_TYPE = 7;
- /** This is to embedd Large Messages from other protocol */
+ /**
+ * This is to embedd Large Messages from other protocol
+ */
byte LARGE_EMBEDDED_TYPE = 8;
default void clearInternalProperties() {
@@ -211,8 +215,7 @@ public interface Message {
}
/**
- * Search for the existence of the property: an implementor can save
- * the message to be decoded, if possible.
+ * Search for the existence of the property: an implementor can save the message to be decoded, if possible.
*/
default boolean hasScheduledDeliveryTime() {
return getScheduledDeliveryTime() != null;
@@ -243,18 +246,17 @@ public interface Message {
}
/**
- * @deprecated do not use this, use through ICoreMessage or ClientMessage
- * Warning: if you need to read the content of a message use getDataBuffer(). This method is intended for when you
- * want to make changes.
+ * @deprecated do not use this, use through ICoreMessage or ClientMessage Warning: if you need to read the content of
+ * a message use getDataBuffer(). This method is intended for when you want to make changes.
*/
@Deprecated
default ActiveMQBuffer getBodyBuffer() {
return null;
}
- /**
- * @deprecated do not use this, use through ICoreMessage or ClientMessage
- */
+ /**
+ * @deprecated do not use this, use through ICoreMessage or ClientMessage
+ */
@Deprecated
default byte getType() {
return (byte)0;
@@ -273,8 +275,9 @@ public interface Message {
*/
void messageChanged();
- /** Used to calculate what is the delivery time.
- * Return null if not scheduled. */
+ /**
+ * Used to calculate what is the delivery time. Return null if not scheduled.
+ */
Long getScheduledDeliveryTime();
void setPaged();
@@ -318,13 +321,19 @@ public interface Message {
Message setReplyTo(SimpleString address);
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
Message copy();
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
Message copy(long newID);
- /** It will generate a new instance of the message encode, being a deep copy, new properties, new everything */
+ /**
+ * It will generate a new instance of the message encode, being a deep copy, new properties, new everything
+ */
default Message copy(long newID, boolean isExpiryOrDLQ) {
return copy(newID);
}
@@ -337,9 +346,7 @@ public interface Message {
}
/**
- * Returns the messageID.
- * <br>
- * The messageID is set when the message is handled by the server.
+ * {@return the messageID; the messageID is set when the message is handled by the server}
*/
long getMessageID();
@@ -361,7 +368,7 @@ public interface Message {
}
/**
- * Returns the expiration time of this message.
+ * {@return the expiration time of this message}
*/
long getExpiration();
@@ -373,7 +380,7 @@ public interface Message {
Message setExpiration(long expiration);
/**
- * Returns whether this message is expired or not.
+ * {@return whether this message is expired or not}
*/
default boolean isExpired() {
if (getExpiration() == 0) {
@@ -383,12 +390,10 @@ public interface Message {
return System.currentTimeMillis() - getExpiration() >= 0;
}
-
/**
- *
- * This represents historically the JMSMessageID.
- * We had in the past used this for the MessageID that was sent on core messages...
- *
+ * This represents historically the JMSMessageID. We had in the past used this for the MessageID that was sent on
+ * core messages...
+ * <p>
* later on when we added AMQP this name clashed with AMQPMessage.getUserID();
*
* @return the user id
@@ -406,7 +411,7 @@ public interface Message {
}
/**
- * Returns whether this message is durable or not.
+ * {@return whether this message is durable or not}
*/
boolean isDurable();
@@ -423,8 +428,6 @@ public interface Message {
/**
* Look at {@link #setAddress(SimpleString)} for the doc.
- * @param address
- * @return
*/
Message setAddress(String address);
@@ -432,16 +435,13 @@ public interface Message {
/**
* This will set the address on CoreMessage.
- *
- * Note for AMQPMessages:
- * in AMQPMessages this will not really change the address on the message. Instead it will add a property
- * on extraProperties which only transverse internally at the broker.
- * Whatever you change here it won't affect anything towards the received message.
- *
+ * <p>
+ * Note for AMQPMessages: in AMQPMessages this will not really change the address on the message. Instead it will add
+ * a property on extraProperties which only transverse internally at the broker. Whatever you change here it won't
+ * affect anything towards the received message.
+ * <p>
* If you wish to change AMQPMessages address you will have to do it directly at the AMQP Message, however beware
* that AMQPMessages are not supposed to be changed at the broker, so only do it if you know what you are doing.
- * @param address
- * @return
*/
Message setAddress(SimpleString address);
@@ -450,9 +450,7 @@ public interface Message {
Message setTimestamp(long timestamp);
/**
- * Returns the message priority.
- * <p>
- * Values range from 0 (less priority) to 9 (more priority) inclusive.
+ * {@return the message priority; values range from 0 (less priority) to 9 (more priority) inclusive}
*/
byte getPriority();
@@ -465,12 +463,17 @@ public interface Message {
*/
Message setPriority(byte priority);
- /** Used to receive this message from an encoded medium buffer */
+ /**
+ * Used to receive this message from an encoded medium buffer
+ */
void receiveBuffer(ByteBuf buffer);
- /** Used to send this message to an encoded medium buffer.
- * @param buffer the buffer used.
- * @param deliveryCount Some protocols (AMQP) will have this as part of the message. */
+ /**
+ * Used to send this message to an encoded medium buffer.
+ *
+ * @param buffer the buffer used.
+ * @param deliveryCount Some protocols (AMQP) will have this as part of the message.
+ */
void sendBuffer(ByteBuf buffer, int deliveryCount);
int getPersistSize();
@@ -479,7 +482,9 @@ public interface Message {
void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools pools);
- /** Propagate message modifications to clients. */
+ /**
+ * Propagate message modifications to clients.
+ */
default void reencode() {
// only valid probably on AMQP
}
@@ -499,7 +504,6 @@ public interface Message {
/**
* it will translate a property named HDR_DUPLICATE_DETECTION_ID.
- * @return
*/
default byte[] getDuplicateIDBytes() {
Object duplicateID = getDuplicateProperty();
@@ -534,59 +538,95 @@ public interface Message {
return null;
}
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBooleanProperty(String key, boolean value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putByteProperty(String key, byte value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBytesProperty(String key, byte[] value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putShortProperty(String key, short value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putCharProperty(String key, char value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putIntProperty(String key, int value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putLongProperty(String key, long value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putFloatProperty(String key, float value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putDoubleProperty(String key, double value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBooleanProperty(SimpleString key, boolean value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putByteProperty(SimpleString key, byte value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putBytesProperty(SimpleString key, byte[] value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putShortProperty(SimpleString key, short value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putCharProperty(SimpleString key, char value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putIntProperty(SimpleString key, int value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putLongProperty(SimpleString key, long value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putFloatProperty(SimpleString key, float value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putDoubleProperty(SimpleString key, double value);
/**
@@ -599,10 +639,14 @@ public interface Message {
*/
Message putStringProperty(String key, String value);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException;
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
Message putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException;
Object removeProperty(String key);
@@ -666,14 +710,17 @@ public interface Message {
Object getAnnotation(SimpleString key);
- /** Callers must call {@link #reencode()} in order to be sent to clients */
+ /**
+ * Callers must call {@link #reencode()} in order to be sent to clients
+ */
default Message setAnnotation(SimpleString key, Object value) {
putObjectProperty(key, value);
return this;
}
- /** To be called by the broker on ocasions such as DLQ and expiry.
- * When the broker is adding additional properties. */
+ /**
+ * To be called by the broker on ocasions such as DLQ and expiry. When the broker is adding additional properties.
+ */
default Message setBrokerProperty(SimpleString key, Object value) {
putObjectProperty(key, value);
return this;
@@ -707,22 +754,21 @@ public interface Message {
Message putStringProperty(SimpleString key, String value);
/**
- * Returns the size of the <em>encoded</em> message.
+ * {@return the size of the <em>encoded</em> message}
*/
int getEncodeSize();
/**
- * Return an estimate of the size of the message on the wire.
- * for LargeMessages this will contain whatever is needed to encode properties and the body size of large messages.
- * For AMQP this will return the whole body size of the message as the body will contain all the data including properties.
- * @return
+ * Return an estimate of the size of the message on the wire. for LargeMessages this will contain whatever is needed
+ * to encode properties and the body size of large messages. For AMQP this will return the whole body size of the
+ * message as the body will contain all the data including properties.
*/
default long getWholeMessageSize() {
return getEncodeSize();
}
/**
- * Returns all the names of the properties for this message.
+ * {@return all the names of the properties for this message}
*/
Set<SimpleString> getPropertyNames();
@@ -734,14 +780,16 @@ public interface Message {
int getDurableCount();
- /** this method indicates usage by components such as large message or page cache.
- * This method will cause large messages to be held longer after the ack happened for instance.
+ /**
+ * This method indicates usage by components such as large message or page cache. This method will cause large
+ * messages to be held longer after the ack happened for instance.
*/
int usageUp();
/**
+ * Opposite of {@link #usageUp()}
+ *
* @see #usageUp()
- * @return
*/
int usageDown();
@@ -754,14 +802,15 @@ public interface Message {
int durableDown();
/**
- * @return Returns the message in Map form, useful when encoding to JSON
+ * {@return Returns the message in Map form, useful when encoding to JSON}
*/
default Map<String, Object> toMap() {
return toMap(-1);
}
/**
- * @return Returns the message in Map form, useful when encoding to JSON
+ * {@return the message in Map form, useful when encoding to JSON}
+ *
* @param valueSizeLimit that limits [] map values
*/
default Map<String, Object> toMap(int valueSizeLimit) {
@@ -782,14 +831,15 @@ public interface Message {
}
/**
- * @return Returns the message properties in Map form, useful when encoding to JSON
+ * {@return Returns the message properties in Map form, useful when encoding to JSON}
*/
default Map<String, Object> toPropertyMap() {
return toPropertyMap(-1);
}
/**
- * @return Returns the message properties in Map form, useful when encoding to JSON
+ * {@return Returns the message properties in Map form, useful when encoding to JSON}
+ *
* @param valueSizeLimit that limits [] map values
*/
default Map<String, Object> toPropertyMap(int valueSizeLimit) {
@@ -806,32 +856,35 @@ public interface Message {
return map;
}
- /** This should make you convert your message into Core format. */
+ /**
+ * This should make you convert your message into Core format.
+ */
ICoreMessage toCore();
default CompositeData toCompositeData(int fieldsLimit, int deliveryCount) throws OpenDataException {
return null;
}
- /** This should make you convert your message into Core format. */
+ /**
+ * This should make you convert your message into Core format.
+ */
ICoreMessage toCore(CoreMessageObjectPools coreMessageObjectPools);
int getMemoryEstimate();
- /** The first estimate that's been calculated without any updates. */
+ /**
+ * The first estimate that's been calculated without any updates.
+ */
default int getOriginalEstimate() {
// For Core Protocol we always use the same estimate
return getMemoryEstimate();
}
/**
- * This is the size of the message when persisted on disk which is used for metrics tracking
- * Note that even if the message itself is not persisted on disk (ie non-durable) this value is
- * still used for metrics tracking
- * If a normal message it will be the encoded message size
- * If a large message it will be encoded message size + large message body size
- * @return
- * @throws ActiveMQException
+ * This is the size of the message when persisted on disk which is used for metrics tracking Note that even if the
+ * message itself is not persisted on disk (ie non-durable) this value is still used for metrics tracking If a normal
+ * message it will be the encoded message size If a large message it will be encoded message size + large message
+ * body size
*/
long getPersistentSize() throws ActiveMQException;
@@ -843,9 +896,13 @@ public interface Message {
return null;
}
- /** Used for user context data. Useful on interceptors. */
+ /**
+ * Used for user context data. Useful on interceptors.
+ */
Object getUserContext(Object key);
- /** Used for user context data. Useful on interceptors. */
+ /**
+ * Used for user context data. Useful on interceptors.
+ */
void setUserContext(Object key, Object value);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
index a92f1bb109..d9333f3b0c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessage.java
@@ -33,12 +33,13 @@ import org.slf4j.LoggerFactory;
import org.slf4j.helpers.MessageFormatter;
/**
- * RefCountMessage is a base-class for any message intending to do reference counting. Currently it is used for
- * large message removal.
- *
- * Additional validation on reference counting will be done If you set a system property named "ARTEMIS_REF_DEBUG" and enable logging on this class.
- * Additional logging output will be written when reference counting is broken and these debug options are applied.
- * */
+ * RefCountMessage is a base-class for any message intending to do reference counting. Currently it is used for large
+ * message removal.
+ * <p>
+ * Additional validation on reference counting will be done If you set a system property named "ARTEMIS_REF_DEBUG" and
+ * enable logging on this class. Additional logging output will be written when reference counting is broken and these
+ * debug options are applied.
+ */
public class RefCountMessage {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -53,8 +54,9 @@ public class RefCountMessage {
return REF_DEBUG && logger.isTraceEnabled();
}
- /** Sub classes constructors willing to debug reference counts,
- * can register the objectCleaner through this method. */
+ /**
+ * Sub classes constructors willing to debug reference counts, can register the objectCleaner through this method.
+ */
protected void registerDebug() {
if (debugStatus == null) {
debugStatus = new DebugState(this.toString());
@@ -73,8 +75,9 @@ public class RefCountMessage {
String description;
/**
- * Notice: This runnable cannot hold any reference back to message otherwise it won't ever happen and you will get a memory leak.
- * */
+ * Notice: This runnable cannot hold any reference back to message otherwise it won't ever happen and you will get
+ * a memory leak.
+ */
Runnable runWhenLeaked;
DebugState(String description) {
@@ -82,8 +85,9 @@ public class RefCountMessage {
addDebug("registered");
}
- /** this marks the Status as accounted for
- * and no need to report an issue when DEBUG hits */
+ /**
+ * this marks the Status as accounted for and no need to report an issue when DEBUG hits
+ */
void accountedFor() {
accounted = true;
}
@@ -143,7 +147,9 @@ public class RefCountMessage {
private volatile boolean errorCheck = true;
- /** has the refCount fired the action already? */
+ /**
+ * has the refCount fired the action already?
+ */
public boolean isReleased() {
return released;
}
@@ -167,7 +173,9 @@ public class RefCountMessage {
message.deferredDebug(formattedDebug);
}
- /** Deferred debug, that will be used in case certain conditions apply to the RefCountMessage */
+ /**
+ * Deferred debug, that will be used in case certain conditions apply to the RefCountMessage
+ */
public void deferredDebug(String message) {
if (parentRef != null) {
parentRef.deferredDebug(message);
@@ -190,8 +198,8 @@ public class RefCountMessage {
}
/**
- * in certain cases the large message is copied from another LargeServerMessage
- * and the ref count needs to be on that place.
+ * in certain cases the large message is copied from another LargeServerMessage and the ref count needs to be on that
+ * place.
*/
private volatile RefCountMessage parentRef;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
index 256f0c3e79..e0e9a583e8 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/RefCountMessageListener.java
@@ -17,7 +17,8 @@
package org.apache.activemq.artemis.api.core;
/**
- * These methods will be called during refCount operations */
+ * These methods will be called during refCount operations
+ */
public interface RefCountMessageListener {
void durableUp(Message message, int durableCount);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
index 41a584b36f..9d2ba4cf01 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
@@ -28,12 +28,10 @@ import org.apache.activemq.artemis.utils.JsonLoader;
import org.apache.activemq.artemis.utils.UUIDGenerator;
/**
- * A TransportConfiguration is used by a client to specify connections to a server and its backup if
- * one exists.
+ * A TransportConfiguration is used by a client to specify connections to a server and its backup if one exists.
* <p>
- * Typically the constructors take the class name and parameters for needed to create the
- * connection. These will be different dependent on which connector is being used, i.e. Netty or
- * InVM etc. For example:
+ * Typically the constructors take the class name and parameters for needed to create the connection. These will be
+ * different dependent on which connector is being used, i.e. Netty or InVM etc. For example:
*
* <pre>
* HashMap<String, Object> map = new HashMap<String, Object>();
@@ -98,8 +96,8 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Creates a TransportConfiguration with a specific name providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
- * and any parameters needed.
+ * Creates a TransportConfiguration with a specific name providing the class name of the
+ * {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory} and any parameters needed.
*
* @param className The class name of the ConnectorFactory
* @param params The parameters needed by the ConnectorFactory
@@ -110,8 +108,8 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Creates a TransportConfiguration with a specific name providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
- * and any parameters needed.
+ * Creates a TransportConfiguration with a specific name providing the class name of the
+ * {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory} and any parameters needed.
*
* @param className The class name of the ConnectorFactory
* @param params The parameters needed by the ConnectorFactory
@@ -139,8 +137,8 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Creates a TransportConfiguration providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
- * and any parameters needed.
+ * Creates a TransportConfiguration providing the class name of the
+ * {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory} and any parameters needed.
*
* @param className The class name of the ConnectorFactory
* @param params The parameters needed by the ConnectorFactory
@@ -150,7 +148,8 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Creates a TransportConfiguration providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
+ * Creates a TransportConfiguration providing the class name of the
+ * {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
*
* @param className The class name of the ConnectorFactory
*/
@@ -159,9 +158,7 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Returns the name of this TransportConfiguration.
- *
- * @return the name
+ * {@return the name of this TransportConfiguration}
*/
public String getName() {
return name;
@@ -172,18 +169,14 @@ public class TransportConfiguration implements Serializable {
}
/**
- * Returns the class name of ConnectorFactory being used by this TransportConfiguration
- *
- * @return The factory's class name
+ * {@return the class name of ConnectorFactory being used by this TransportConfiguration}
*/
public String getFactoryClassName() {
return factoryClassName;
}
/**
- * Returns any parameters set for this TransportConfiguration
- *
- * @return the parameters
+ * {@return any parameters set for this TransportConfiguration}
*/
public Map<String, Object> getParams() {
return params;
@@ -247,12 +240,10 @@ public class TransportConfiguration implements Serializable {
}
/**
- * There's a case on ClusterConnections that we need to find an equivalent Connector and we can't
- * use a Netty Cluster Connection on an InVM ClusterConnection (inVM used on tests) for that
- * reason I need to test if the two instances of the TransportConfiguration are equivalent while
- * a test a connector against an acceptor
+ * There's a case on ClusterConnections that we need to find an equivalent Connector and we can't use a Netty Cluster
+ * Connection on an InVM ClusterConnection (inVM used on tests) for that reason I need to test if the two instances
+ * of the TransportConfiguration are equivalent while a test a connector against an acceptor
*
- * @param otherConfig
* @return {@code true} if the factory class names are equivalents
*/
public boolean isEquivalent(TransportConfiguration otherConfig) {
@@ -292,7 +283,7 @@ public class TransportConfiguration implements Serializable {
String key = entry.getKey();
- // HORNETQ-1281 - don't log passwords
+ // don't log passwords
String val;
if (key.toLowerCase().contains("password")) {
val = "****";
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TrustManagerFactoryPlugin.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TrustManagerFactoryPlugin.java
index f1d1429c26..233f83722b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TrustManagerFactoryPlugin.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TrustManagerFactoryPlugin.java
@@ -21,7 +21,8 @@ import javax.net.ssl.TrustManagerFactory;
public interface TrustManagerFactoryPlugin {
/**
- * @return the TrustManagerFactory used when invoking javax.net.ssl.TrustManagerFactory#getTrustManagers() to initialize the SSLContext
+ * {@return the TrustManagerFactory used when invoking {@link javax.net.ssl.TrustManagerFactory#getTrustManagers()}
+ * to initialize the {@code SSLContext}}
*/
TrustManagerFactory getTrustManagerFactory();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
index 08b8c30f30..e9a001e8d9 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
@@ -92,8 +92,8 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
}
/**
- * <p> This is the member discovery implementation using direct UDP. It was extracted as a refactoring from
- * {@link org.apache.activemq.artemis.core.cluster.DiscoveryGroup}</p>
+ * This is the member discovery implementation using direct UDP. It was extracted as a refactoring from
+ * {@link org.apache.activemq.artemis.core.cluster.DiscoveryGroup}
*/
private static class UDPBroadcastEndpoint implements BroadcastEndpoint {
@@ -197,7 +197,6 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
@Override
public void openClient() throws Exception {
- // HORNETQ-874
if (checkForLinux() || checkForSolaris() || checkForHp()) {
try {
receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort));
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
index e5b5229f1a..66e4e9fec2 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
@@ -41,9 +41,9 @@ import org.apache.activemq.artemis.utils.ActiveMQThreadPoolExecutor;
/**
* Utility class for creating ActiveMQ Artemis {@link ClientSessionFactory} objects.
* <p>
- * Once a {@link ClientSessionFactory} has been created, it can be further configured using its
- * setter methods before creating the sessions. Once a session is created, the factory can no longer
- * be modified (its setter methods will throw a {@link IllegalStateException}.
+ * Once a {@link ClientSessionFactory} has been created, it can be further configured using its setter methods before
+ * creating the sessions. Once a session is created, the factory can no longer be modified (its setter methods will
+ * throw a {@link IllegalStateException}.
*/
public final class ActiveMQClient {
@@ -224,7 +224,8 @@ public final class ActiveMQClient {
}
/**
- * Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous ServerLocator would be broken after this call.
+ * Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous
+ * ServerLocator would be broken after this call.
*/
public static synchronized void injectPools(ExecutorService globalThreadPool,
ScheduledExecutorService scheduledThreadPool,
@@ -286,16 +287,16 @@ public final class ActiveMQClient {
}
/**
- * Initializes the global thread pools properties from System properties. This method will update the global
- * thread pool configuration based on defined System properties (or defaults if they are not set).
- * The System properties key names are as follow:
- *
+ * Initializes the global thread pools properties from System properties. This method will update the global thread
+ * pool configuration based on defined System properties (or defaults if they are not set). The System properties key
+ * names are as follow:
+ * <p>
* ActiveMQClient.THREAD_POOL_MAX_SIZE_PROPERTY_KEY="activemq.artemis.client.global.thread.pool.max.size"
* ActiveMQClient.SCHEDULED_THREAD_POOL_SIZE_PROPERTY_KEY="activemq.artemis.client.global.scheduled.thread.pool.core.size
- *
- * The min value for max thread pool size is 2. If the value is not -1, but lower than 2, it will be ignored and will default to 2.
- * A value of -1 configures an unbounded thread pool.
- *
+ * <p>
+ * The min value for max thread pool size is 2. If the value is not -1, but lower than 2, it will be ignored and will
+ * default to 2. A value of -1 configures an unbounded thread pool.
+ * <p>
* Note: If global thread pools have already been created, they will not be updated with these new values.
*/
public static void initializeGlobalThreadPoolProperties() {
@@ -304,13 +305,13 @@ public final class ActiveMQClient {
}
/**
- * Allows programmatical configuration of global thread pools properties. This method will update the global
- * thread pool configuration based on the provided values notifying all globalThreadPoolListeners.
- *
+ * Allows programmatical configuration of global thread pools properties. This method will update the global thread
+ * pool configuration based on the provided values notifying all globalThreadPoolListeners.
+ * <p>
* Note: If global thread pools have already been created, they will not be updated with these new values.
- *
- * The min value for globalThreadMaxPoolSize is 2. If the value is not -1, but lower than 2, it will be ignored and will default to 2.
- * A value of -1 configures an unbounded thread pool.
+ * <p>
+ * The min value for globalThreadMaxPoolSize is 2. If the value is not -1, but lower than 2, it will be ignored and
+ * will default to 2. A value of -1 configures an unbounded thread pool.
*/
public static void setGlobalThreadPoolProperties(int globalThreadMaxPoolSize, int globalScheduledThreadPoolSize, int globalFlowControlThreadPoolSize) {
@@ -333,10 +334,10 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the ServerLocator is not updated automatically
- * as the cluster topology changes, and no HA backup information is propagated to the client
+ * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the
+ * ServerLocator is not updated automatically as the cluster topology changes, and no HA backup information is
+ * propagated to the client
*
- * @param transportConfigurations
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithoutHA(TransportConfiguration... transportConfigurations) {
@@ -344,11 +345,12 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the ServerLocator is not updated automatically
- * as the cluster topology changes, and no HA backup information is propagated to the client
+ * Create a ServerLocator which creates session factories using a static list of transportConfigurations, the
+ * ServerLocator is not updated automatically as the cluster topology changes, and no HA backup information is
+ * propagated to the client
*
- * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise the first connection will timeout)
- * @param transportConfigurations
+ * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise
+ * the first connection will timeout)
* @return the ServerLocator
*/
public static ServerLocator createServerLocator(final boolean ha,
@@ -357,12 +359,11 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which creates session factories from a set of active servers, no HA
- * backup information is propagated to the client
+ * Create a ServerLocator which creates session factories from a set of active servers, no HA backup information is
+ * propagated to the client
* <p>
* The UDP address and port are used to listen for active servers in the cluster
*
- * @param groupConfiguration
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithoutHA(final DiscoveryGroupConfiguration groupConfiguration) {
@@ -370,13 +371,11 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which creates session factories from a set of active servers, no HA
- * backup information is propagated to the client The UDP address and port are used to listen for
- * active servers in the cluster
+ * Create a ServerLocator which creates session factories from a set of active servers, no HA backup information is
+ * propagated to the client The UDP address and port are used to listen for active servers in the cluster
*
- * @param ha The Locator will support topology updates and ha (this required the server to be
- * clustered, otherwise the first connection will timeout)
- * @param groupConfiguration
+ * @param ha The Locator will support topology updates and ha (this required the server to be clustered, otherwise
+ * the first connection will timeout)
* @return the ServerLocator
*/
public static ServerLocator createServerLocator(final boolean ha,
@@ -385,19 +384,19 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which will receive cluster topology updates from the cluster as servers
- * leave or join and new backups are appointed or removed.
+ * Create a ServerLocator which will receive cluster topology updates from the cluster as servers leave or join and
+ * new backups are appointed or removed.
* <p>
- * The initial list of servers supplied in this method is simply to make an initial connection to
- * the cluster, once that connection is made, up to date cluster topology information is
- * downloaded and automatically updated whenever the cluster topology changes.
+ * The initial list of servers supplied in this method is simply to make an initial connection to the cluster, once
+ * that connection is made, up to date cluster topology information is downloaded and automatically updated whenever
+ * the cluster topology changes.
* <p>
- * If the topology includes backup servers that information is also propagated to the client so
- * that it can know which server to failover onto in case of active server failure.
+ * If the topology includes backup servers that information is also propagated to the client so that it can know
+ * which server to failover onto in case of active server failure.
*
- * @param initialServers The initial set of servers used to make a connection to the cluster.
- * Each one is tried in turn until a successful connection is made. Once a connection
- * is made, the cluster topology is downloaded and the rest of the list is ignored.
+ * @param initialServers The initial set of servers used to make a connection to the cluster. Each one is tried in
+ * turn until a successful connection is made. Once a connection is made, the cluster topology
+ * is downloaded and the rest of the list is ignored.
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithHA(TransportConfiguration... initialServers) {
@@ -405,19 +404,17 @@ public final class ActiveMQClient {
}
/**
- * Create a ServerLocator which will receive cluster topology updates from the cluster as servers
- * leave or join and new backups are appointed or removed.
+ * Create a ServerLocator which will receive cluster topology updates from the cluster as servers leave or join and
+ * new backups are appointed or removed.
* <p>
- * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP
- * broadcasts which contain connection information for members of the cluster. The broadcasted
- * connection information is simply used to make an initial connection to the cluster, once that
- * connection is made, up to date cluster topology information is downloaded and automatically
- * updated whenever the cluster topology changes.
+ * The discoveryAddress and discoveryPort parameters in this method are used to listen for UDP broadcasts which
+ * contain connection information for members of the cluster. The broadcasted connection information is simply used
+ * to make an initial connection to the cluster, once that connection is made, up to date cluster topology
+ * information is downloaded and automatically updated whenever the cluster topology changes.
* <p>
- * If the topology includes backup servers that information is also propagated to the client so
- * that it can know which server to failover onto in case of active server failure.
+ * If the topology includes backup servers that information is also propagated to the client so that it can know
+ * which server to failover onto in case of active server failure.
*
- * @param groupConfiguration
* @return the ServerLocator
*/
public static ServerLocator createServerLocatorWithHA(final DiscoveryGroupConfiguration groupConfiguration) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
index 7db6180a93..91e7705e9b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java
@@ -21,23 +21,20 @@ import org.apache.activemq.artemis.spi.core.remoting.ConsumerContext;
/**
* A ClientConsumer receives messages from ActiveMQ Artemis queues.
- * <br>
- * Messages can be consumed synchronously by using the <code>receive()</code> methods
- * which will block until a message is received (or a timeout expires) or asynchronously
- * by setting a {@link MessageHandler}.
- * <br>
- * These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will
- * throw ActiveMQException if its <code>receive()</code> methods are called.
+ * <p>
+ * Messages can be consumed synchronously by using the {@code receive()} methods which will block until a message is
+ * received (or a timeout expires) or asynchronously by setting a {@link MessageHandler}.
+ * <p>
+ * These 2 types of consumption are exclusive: a ClientConsumer with a MessageHandler set will throw ActiveMQException
+ * if its {@code receive()} methods are called.
*
* @see ClientSession#createConsumer(String)
*/
public interface ClientConsumer extends AutoCloseable {
/**
- * The server's ID associated with this consumer.
- * ActiveMQ Artemis implements this as a long but this could be protocol dependent.
- *
- * @return
+ * The server's ID associated with this consumer. ActiveMQ Artemis implements this as a long but this could be
+ * protocol dependent.
*/
ConsumerContext getConsumerContext();
@@ -67,14 +64,14 @@ public interface ClientConsumer extends AutoCloseable {
ClientMessage receive(long timeout) throws ActiveMQException;
/**
- * Receives a message from a queue. This call will force a network trip to ActiveMQ Artemis server to
- * ensure that there are no messages in the queue which can be delivered to this consumer.
+ * Receives a message from a queue. This call will force a network trip to ActiveMQ Artemis server to ensure that
+ * there are no messages in the queue which can be delivered to this consumer.
* <p>
- * This call will never wait indefinitely for a message, it will return {@code null} if no
- * messages are available for this consumer.
+ * This call will never wait indefinitely for a message, it will return {@code null} if no messages are available for
+ * this consumer.
* <p>
- * Note however that there is a performance cost as an additional network trip to the server may
- * required to check the queue status.
+ * Note however that there is a performance cost as an additional network trip to the server may required to check
+ * the queue status.
* <p>
* Calling this method on a closed consumer will throw an ActiveMQException.
*
@@ -84,8 +81,6 @@ public interface ClientConsumer extends AutoCloseable {
ClientMessage receiveImmediate() throws ActiveMQException;
/**
- * Returns the MessageHandler associated to this consumer.
- * <p>
* Calling this method on a closed consumer will throw an ActiveMQException.
*
* @return the MessageHandler associated to this consumer or {@code null}
@@ -96,8 +91,8 @@ public interface ClientConsumer extends AutoCloseable {
/**
* Sets the MessageHandler for this consumer to consume messages asynchronously.
* <p>
- * Note that setting a handler dedicates the parent session, and its child producers
- * and consumers, to the session-wide handler delivery thread of control.
+ * Note that setting a handler dedicates the parent session, and its child producers and consumers, to the
+ * session-wide handler delivery thread of control.
* <p>
* Calling this method on a closed consumer will throw a ActiveMQException.
*
@@ -109,25 +104,18 @@ public interface ClientConsumer extends AutoCloseable {
/**
* Closes the consumer.
* <p>
- * Once this consumer is closed, it can not receive messages, whether synchronously or
- * asynchronously.
- *
- * @throws ActiveMQException
+ * Once this consumer is closed, it can not receive messages, whether synchronously or asynchronously.
*/
@Override
void close() throws ActiveMQException;
/**
- * Returns whether the consumer is closed or not.
- *
- * @return <code>true</code> if this consumer is closed, <code>false</code> else
+ * {@return {@code true} if this consumer is closed, {@code false} else}
*/
boolean isClosed();
/**
- * Returns the last exception thrown by a call to this consumer's MessageHandler.
- *
- * @return the last exception thrown by a call to this consumer's MessageHandler or {@code null}
+ * {@return the last exception thrown by a call to this consumer's MessageHandler or {@code null}}
*/
Exception getLastException();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
index 1af7d91bf8..b6c1287f6c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
@@ -30,7 +30,7 @@ import org.apache.activemq.artemis.api.core.SimpleString;
public interface ClientMessage extends ICoreMessage {
/**
- * Returns the number of times this message was delivered.
+ * {@return the number of times this message was delivered.}
*/
int getDeliveryCount();
@@ -47,9 +47,9 @@ public interface ClientMessage extends ICoreMessage {
/**
* Acknowledges reception of this message.
* <p>
- * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to
- * {@code true}, the transaction will automatically commit the current transaction. Otherwise,
- * this acknowledgement will not be committed until the client commits the session transaction.
+ * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to {@code true}, the
+ * transaction will automatically commit the current transaction. Otherwise, this acknowledgement will not be
+ * committed until the client commits the session transaction.
*
* @throws ActiveMQException if an error occurred while acknowledging the message.
* @see ClientSession#isAutoCommitAcks()
@@ -59,9 +59,9 @@ public interface ClientMessage extends ICoreMessage {
/**
* Acknowledges reception of a single message.
* <p>
- * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to
- * {@code true}, the transaction will automatically commit the current transaction. Otherwise,
- * this acknowledgement will not be committed until the client commits the session transaction.
+ * If the session responsible to acknowledge this message has {@code autoCommitAcks} set to {@code true}, the
+ * transaction will automatically commit the current transaction. Otherwise, this acknowledgement will not be
+ * committed until the client commits the session transaction.
*
* @throws ActiveMQException if an error occurred while acknowledging the message.
* @see ClientSession#isAutoCommitAcks()
@@ -69,54 +69,46 @@ public interface ClientMessage extends ICoreMessage {
ClientMessage individualAcknowledge() throws ActiveMQException;
/**
- * This can be optionally used to verify if the entire message has been received.
- * It won't have any effect on regular messages but it may be helpful on large messages.
- * The use case for this is to make sure there won't be an exception while getting the buffer.
- * Using getBodyBuffer directly would have the same effect but you could get a Runtime non checked Exception
- * instead
- *
- * @throws ActiveMQException
+ * This can be optionally used to verify if the entire message has been received. It won't have any effect on regular
+ * messages but it may be helpful on large messages. The use case for this is to make sure there won't be an
+ * exception while getting the buffer. Using getBodyBuffer directly would have the same effect but you could get a
+ * Runtime non checked Exception instead
*/
void checkCompletion() throws ActiveMQException;
/**
- * Returns the size (in bytes) of this message's body
+ * {@return the size (in bytes) of this message's body}
*/
int getBodySize();
/**
* Sets the OutputStream that will receive the content of a message received in a non blocking way.
- * <br>
+ * <p>
* This method is used when consuming large messages
*
* @return this ClientMessage
- * @throws ActiveMQException
*/
ClientMessage setOutputStream(OutputStream out) throws ActiveMQException;
/**
- * Saves the content of the message to the OutputStream.
- * It will block until the entire content is transferred to the OutputStream.
- * <br>
- *
- * @throws ActiveMQException
+ * Saves the content of the message to the OutputStream. It will block until the entire content is transferred to the
+ * OutputStream.
*/
void saveToOutputStream(OutputStream out) throws ActiveMQException;
/**
* Wait the outputStream completion of the message.
- *
+ * <p>
* This method is used when consuming large messages
*
* @param timeMilliseconds - 0 means wait forever
* @return true if it reached the end
- * @throws ActiveMQException
*/
boolean waitOutputStreamCompletion(long timeMilliseconds) throws ActiveMQException;
/**
* Sets the body's IntputStream.
- * <br>
+ * <p>
* This method is used when sending large messages
*
* @return this ClientMessage
@@ -125,15 +117,13 @@ public interface ClientMessage extends ICoreMessage {
/**
* Return the bodyInputStream for large messages
- * @return
*/
@Override
InputStream getBodyInputStream();
/**
- * The buffer to write the body.
- * Warning: If you just want to read the content of a message, use getDataBuffer() or getReadOnlyBuffer();
- * @return
+ * The buffer to write the body. Warning: If you just want to read the content of a message, use getDataBuffer() or
+ * getReadOnlyBuffer();
*/
@Override
ActiveMQBuffer getBodyBuffer();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
index 4faeba7cb9..c2b82bbd6f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java
@@ -21,43 +21,33 @@ import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.SimpleString;
/**
- * A ClientProducer is used to send messages to a specific address. Messages are then routed on the
- * server to any queues that are bound to the address. A ClientProducer can either be created with a
- * specific address in mind or with none. With the latter the address must be provided using the
- * appropriate send() method. <br>
+ * A {@code ClientProducer} is used to send messages to a specific address. Messages are then routed on the server to
+ * any queues that are bound to the address. A {@code ClientProducer} can either be created with a specific address in
+ * mind or with none. With the latter the address must be provided using the appropriate {@code send} method.
* <p>
* The sending semantics can change depending on what blocking semantics are set via
- * {@link ServerLocator#setBlockOnDurableSend(boolean)} and
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} . If set to
- * true then for each message type, durable and non durable respectively, any exceptions such as the
- * address not existing or security exceptions will be thrown at the time of send. Alternatively if
- * set to false then exceptions will only be logged on the server. <br>
+ * {@link ServerLocator#setBlockOnDurableSend} and {@link ServerLocator#setBlockOnNonDurableSend}. If set to
+ * {@code true} then for each message type, durable and non durable respectively, any exceptions such as the address not
+ * existing or security exceptions will be thrown at the time of send. Alternatively if set to {@code false} then
+ * exceptions will only be logged on the server.
* <p>
- * The send rate can also be controlled via {@link ServerLocator#setProducerMaxRate(int)} and the
- * {@link ServerLocator#setProducerWindowSize(int)}. <br>
- * <br>
+ * The send rate can also be controlled via {@link ServerLocator#setProducerMaxRate} and the
+ * {@link ServerLocator#setProducerWindowSize}.
*/
public interface ClientProducer extends AutoCloseable {
/**
- * Returns the address where messages will be sent.
- *
- * <br><br>The address can be {@code null} if the ClientProducer
- *
- * was creating without specifying an address, that is by using {@link ClientSession#createProducer()}.
- *
- * @return the address where messages will be sent
+ * {@return the address where messages will be sent; the address can be {@code null} if the {@code ClientProducer}
+ * was created without specifying an address, e.g. by using {@link ClientSession#createProducer()}}
*/
SimpleString getAddress();
/**
- * Sends a message to an address. specified in {@link ClientSession#createProducer(String)} or
- * similar methods. <br>
- * <br>
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to <code>true</code> for the
- * specified message type.
+ * Sends a message to an address. specified in {@link ClientSession#createProducer(String)} or similar methods.
+ * <p>
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to {@code true} for the specified message type.
*
* @param message the message to send
* @throws ActiveMQException if an exception occurs while sending the message
@@ -65,8 +55,8 @@ public interface ClientProducer extends AutoCloseable {
void send(Message message) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address. <br>
- * <br>
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ * <p>
* This message will be sent asynchronously.
* <p>
* The handler will only get called if {@link ServerLocator#setConfirmationWindowSize(int) -1}.
@@ -78,12 +68,11 @@ public interface ClientProducer extends AutoCloseable {
void send(Message message, SendAcknowledgementHandler handler) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address. <br>
- * <br>
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true for the specified
- * message type.
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ * <p>
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to true for the specified message type.
*
* @param address the address where the message will be sent
* @param message the message to send
@@ -92,8 +81,8 @@ public interface ClientProducer extends AutoCloseable {
void send(SimpleString address, Message message) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address. <br>
- * <br>
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ * <p>
* This message will be sent asynchronously as long as {@link ServerLocator#setConfirmationWindowSize(int)} was set.
* <p>
* Notice that if no confirmationWindowsize is set
@@ -106,12 +95,11 @@ public interface ClientProducer extends AutoCloseable {
void send(SimpleString address, Message message, SendAcknowledgementHandler handler) throws ActiveMQException;
/**
- * Sends a message to the specified address instead of the ClientProducer's address. <br>
- * <br>
- * This will block until confirmation that the message has reached the server has been received
- * if {@link ServerLocator#setBlockOnDurableSend(boolean)} or
- * {@link ServerLocator#setBlockOnNonDurableSend(boolean)} are set to true for the specified
- * message type.
+ * Sends a message to the specified address instead of the ClientProducer's address.
+ * <p>
+ * This will block until confirmation that the message has reached the server has been received if
+ * {@link ServerLocator#setBlockOnDurableSend(boolean)} or {@link ServerLocator#setBlockOnNonDurableSend(boolean)}
+ * are set to true for the specified message type.
*
* @param address the address where the message will be sent
* @param message the message to send
@@ -128,30 +116,22 @@ public interface ClientProducer extends AutoCloseable {
void close() throws ActiveMQException;
/**
- * Returns whether the producer is closed or not.
- *
- * @return <code>true</code> if the producer is closed, <code>false</code> else
+ * {@return {@code true} if the producer is closed, {@code false} else}
*/
boolean isClosed();
/**
- * Returns whether the producer will block when sending <em>durable</em> messages.
- *
- * @return <code>true</code> if the producer blocks when sending durable, <code>false</code> else
+ * {@return {@code true} if the producer blocks when sending <em>durable</em> messages, {@code false} else}
*/
boolean isBlockOnDurableSend();
/**
- * Returns whether the producer will block when sending <em>non-durable</em> messages.
- *
- * @return <code>true</code> if the producer blocks when sending non-durable, <code>false</code> else
+ * {@return {@code true} if the producer blocks when sending <em>non-durable</em> messages, {@code false} else}
*/
boolean isBlockOnNonDurableSend();
/**
- * Returns the maximum rate at which a ClientProducer can send messages per second.
- *
- * @return the producers maximum rate
+ * {@return the maximum rate at which a ClientProducer can send messages per second}
*/
int getMaxRate();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
index 8325686404..c02a33d18c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientRequestor.java
@@ -24,9 +24,9 @@ import org.apache.activemq.artemis.core.client.impl.ClientMessageImpl;
/**
* The ClientRequestor class helps making requests.
- * <br>
- * The ClientRequestor constructor is given a ClientSession and a request address.
- * It creates a temporary queue for the responses and provides a request method that sends the request message and waits for its reply.
+ * <p>
+ * The ClientRequestor constructor is given a ClientSession and a request address. It creates a temporary queue for the
+ * responses and provides a request method that sends the request message and waits for its reply.
*/
public final class ClientRequestor implements AutoCloseable {
@@ -40,12 +40,11 @@ public final class ClientRequestor implements AutoCloseable {
/**
* Constructor for the ClientRequestor.
- *
+ * <p>
* The implementation expects a ClientSession with automatic commits of sends and acknowledgements
*
* @param session a ClientSession uses to handle requests and replies
* @param requestAddress the address to send request messages to
- * @throws Exception
*/
public ClientRequestor(final ClientSession session, final SimpleString requestAddress) throws Exception {
queueSession = session;
@@ -64,25 +63,23 @@ public final class ClientRequestor implements AutoCloseable {
}
/**
- * Sends a message to the request address and wait indefinitely for a reply.
- * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected
+ * Sends a message to the request address and wait indefinitely for a reply. The temporary queue is used for the
+ * REPLYTO_HEADER_NAME, and only one reply per request is expected
*
* @param request the message to send
* @return the reply message
- * @throws Exception
*/
public ClientMessage request(final ClientMessage request) throws Exception {
return request(request, 0);
}
/**
- * Sends a message to the request address and wait for the given timeout for a reply.
- * The temporary queue is used for the REPLYTO_HEADER_NAME, and only one reply per request is expected
+ * Sends a message to the request address and wait for the given timeout for a reply. The temporary queue is used for
+ * the REPLYTO_HEADER_NAME, and only one reply per request is expected
*
* @param request the message to send
* @param timeout the timeout to wait for a reply (in milliseconds)
* @return the reply message or {@code null} if no message is replied before the timeout elapses
- * @throws Exception
*/
public ClientMessage request(final ClientMessage request, final long timeout) throws Exception {
request.putStringProperty(ClientMessageImpl.REPLYTO_HEADER_NAME, replyQueue);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
index 861f64d693..cc0b5eea3f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
@@ -24,31 +24,28 @@ import java.util.Set;
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.QueueAttributes;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
-import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.SimpleString;
/**
* A ClientSession is a single-threaded parent object required for producing and consuming messages.
* <p>
- * Only a single thread may be used to operate on the session and its child producers and consumers,
- * other than close() methods which may be called from another thread. Setting a MessageHandler on a
- * consumer renders the session, and all its child producers and consumers, to be dedicated to the
- * session-wide handler delivery thread of control.
+ * Only a single thread may be used to operate on the session and its child producers and consumers, other than close()
+ * methods which may be called from another thread. Setting a MessageHandler on a consumer renders the session, and all
+ * its child producers and consumers, to be dedicated to the session-wide handler delivery thread of control.
*/
public interface ClientSession extends XAResource, AutoCloseable {
/**
- * This is used to identify a ClientSession as used by the JMS Layer
- * The JMS Layer will add this through Meta-data, so the server or management layers
- * can identify session created over core API purely or through the JMS Layer
+ * This is used to identify a ClientSession as used by the JMS Layer The JMS Layer will add this through Meta-data,
+ * so the server or management layers can identify session created over core API purely or through the JMS Layer
*/
String JMS_SESSION_IDENTIFIER_PROPERTY = "jms-session";
/**
- * Just like {@link ClientSession.AddressQuery#JMS_SESSION_IDENTIFIER_PROPERTY} this is
- * used to identify the ClientID over JMS Session.
- * However this is only used when the JMS Session.clientID is set (which is optional).
- * With this property management tools and the server can identify the jms-client-id used over JMS
+ * Just like {@link ClientSession.AddressQuery#JMS_SESSION_IDENTIFIER_PROPERTY} this is used to identify the ClientID
+ * over JMS Session. However this is only used when the JMS Session.clientID is set (which is optional). With this
+ * property management tools and the server can identify the jms-client-id used over JMS
*/
String JMS_SESSION_CLIENT_ID_PROPERTY = "jms-client-id";
@@ -60,22 +57,22 @@ public interface ClientSession extends XAResource, AutoCloseable {
interface AddressQuery {
/**
- * Returns <code>true</code> if the binding exists, <code>false</code> else.
+ * {@return {@code true} if the binding exists, {@code false} else}
*/
boolean isExists();
/**
- * Returns the names of the queues bound to the binding.
+ * {@return the names of the queues bound to the binding}
*/
List<SimpleString> getQueueNames();
/**
- * Returns <code>true</code> if auto-queue-creation for this address is enabled, <code>false</code> else.
+ * {@return {@code true} if auto-queue-creation for this address is enabled, {@code false} else}
*/
boolean isAutoCreateQueues();
/**
- * Returns <code>true</code> if auto-address-creation for this address is enabled, <code>false</code> else.
+ * {@return {@code true} if auto-address-creation for this address is enabled, {@code false} else}
*/
boolean isAutoCreateAddresses();
@@ -108,50 +105,48 @@ public interface ClientSession extends XAResource, AutoCloseable {
interface QueueQuery {
... 73803 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
(activemq-artemis) 01/03: ARTEMIS-5315 remove unnecessary InetAddresses code
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 003063aee65afc599d8e17cfeca16e5b671c091b
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Tue Feb 18 20:55:00 2025 -0600
ARTEMIS-5315 remove unnecessary InetAddresses code
---
.../activemq/artemis/utils/InetAddresses.java | 390 +--------------------
1 file changed, 1 insertion(+), 389 deletions(-)
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/InetAddresses.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/InetAddresses.java
index f6eb788aaf..6ce664ef28 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/InetAddresses.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/InetAddresses.java
@@ -16,142 +16,16 @@
*/
package org.apache.activemq.artemis.utils;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Locale;
-import static org.apache.activemq.artemis.utils.ByteUtil.intFromBytes;
-
-/**
- * Static utility methods pertaining to {@link InetAddress} instances.
- *
- * <p><b>Important note:</b> Unlike {@code InetAddress.getByName()}, the
- * methods of this class never cause DNS services to be accessed. For
- * this reason, you should prefer these methods as much as possible over
- * their JDK equivalents whenever you are expecting to handle only
- * IP address string literals -- there is no blocking DNS penalty for a
- * malformed string.
- *
- * <p>When dealing with {@link Inet4Address} and {@link Inet6Address}
- * objects as byte arrays (vis. {@code InetAddress.getAddress()}) they
- * are 4 and 16 bytes in length, respectively, and represent the address
- * in network byte order.
- *
- * <p>Examples of IP addresses and their byte representations:
- * <ul>
- * <li>The IPv4 loopback address, {@code "127.0.0.1"}.<br>
- * {@code 7f 00 00 01}
- *
- * <li>The IPv6 loopback address, {@code "::1"}.<br>
- * {@code 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01}
- *
- * <li>From the IPv6 reserved documentation prefix ({@code 2001:db8::/32}),
- * {@code "2001:db8::1"}.<br>
- * {@code 20 01 0d b8 00 00 00 00 00 00 00 00 00 00 00 01}
- *
- * <li>An IPv6 "IPv4 compatible" (or "compat") address,
- * {@code "::192.168.0.1"}.<br>
- * {@code 00 00 00 00 00 00 00 00 00 00 00 00 c0 a8 00 01}
- *
- * <li>An IPv6 "IPv4 mapped" address, {@code "::ffff:192.168.0.1"}.<br>
- * {@code 00 00 00 00 00 00 00 00 00 00 ff ff c0 a8 00 01}
- * </ul>
- *
- * <p>A few notes about IPv6 "IPv4 mapped" addresses and their observed
- * use in Java.
- * <br><br>
- * "IPv4 mapped" addresses were originally a representation of IPv4
- * addresses for use on an IPv6 socket that could receive both IPv4
- * and IPv6 connections (by disabling the {@code IPV6_V6ONLY} socket
- * option on an IPv6 socket). Yes, it's confusing. Nevertheless,
- * these "mapped" addresses were never supposed to be seen on the
- * wire. That assumption was dropped, some say mistakenly, in later
- * RFCs with the apparent aim of making IPv4-to-IPv6 transition simpler.
- *
- * <p>Technically one <i>can</i> create a 128bit IPv6 address with the wire
- * format of a "mapped" address, as shown above, and transmit it in an
- * IPv6 packet header. However, Java's InetAddress creation methods
- * appear to adhere doggedly to the original intent of the "mapped"
- * address: all "mapped" addresses return {@link Inet4Address} objects.
- *
- * <p>For added safety, it is common for IPv6 network operators to filter
- * all packets where either the source or destination address appears to
- * be a "compat" or "mapped" address. Filtering suggestions usually
- * recommend discarding any packets with source or destination addresses
- * in the invalid range {@code ::/3}, which includes both of these bizarre
- * address formats. For more information on "bogons", including lists
- * of IPv6 bogon space, see:
- *
- * <ul>
- * <li><a target="_parent"
- * href="http://en.wikipedia.org/wiki/Bogon_filtering"
- * >http://en.wikipedia.org/wiki/Bogon_filtering</a>
- * <li><a target="_parent"
- * href="http://www.cymru.com/Bogons/ipv6.txt"
- * >http://www.cymru.com/Bogons/ipv6.txt</a>
- * <li><a target="_parent"
- * href="http://www.cymru.com/Bogons/v6bogon.html"
- * >http://www.cymru.com/Bogons/v6bogon.html</a>
- * <li><a target="_parent"
- * href="http://www.space.net/~gert/RIPE/ipv6-filters.html"
- * >http://www.space.net/~gert/RIPE/ipv6-filters.html</a>
- * </ul>
- *
- */
public final class InetAddresses {
private static final int IPV4_PART_COUNT = 4;
private static final int IPV6_PART_COUNT = 8;
- private InetAddresses() {
- }
-
- /**
- * Returns an {@link Inet4Address}, given a byte array representation of the IPv4 address.
- *
- * @param bytes byte array representing an IPv4 address (should be of length 4)
- * @return {@link Inet4Address} corresponding to the supplied byte array
- * @throws IllegalArgumentException if a valid {@link Inet4Address} can not be created
- */
- private static Inet4Address getInet4Address(byte[] bytes) {
- Preconditions.checkArgument(bytes.length == 4,
- "Byte array has invalid length for an IPv4 address: %s != 4.",
- bytes.length);
-
- // Given a 4-byte array, this cast should always succeed.
- return (Inet4Address) bytesToInetAddress(bytes);
- }
-
- /**
- * Returns the {@link InetAddress} having the given string representation.
- *
- * <p>This deliberately avoids all nameservice lookups (e.g. no DNS).
- *
- * @param ipString {@code String} containing an IPv4 or IPv6 string literal, e.g.
- * {@code "192.168.0.1"} or {@code "2001:db8::1"}
- * @return {@link InetAddress} representing the argument
- * @throws IllegalArgumentException if the argument is not a valid IP string literal
- */
- public static InetAddress forString(String ipString) {
- byte[] addr = ipStringToBytes(ipString);
-
- // The argument was malformed, i.e. not an IP string literal.
- if (addr == null) {
- throw formatIllegalArgumentException("'%s' is not an IP string literal.", ipString);
- }
-
- return bytesToInetAddress(addr);
- }
-
/**
- * Returns {@code true} if the supplied string is a valid IP string
- * literal, {@code false} otherwise.
+ * {@return {@code true} if the supplied string is a valid IP string literal, {@code false} otherwise}
*
* @param ipString {@code String} to evaluated as an IP string literal
- * @return {@code true} if the argument is a valid IP string literal
*/
public static boolean isInetAddress(String ipString) {
return ipStringToBytes(ipString) != null;
@@ -303,266 +177,4 @@ public final class InetAddresses {
}
return (short) hextet;
}
-
- /**
- * Convert a byte array into an InetAddress.
- *
- * {@link InetAddress#getByAddress} is documented as throwing a checked
- * exception "if IP address is of illegal length." We replace it with
- * an unchecked exception, for use by callers who already know that addr
- * is an array of length 4 or 16.
- *
- * @param addr the raw 4-byte or 16-byte IP address in big-endian order
- * @return an InetAddress object created from the raw IP address
- */
- private static InetAddress bytesToInetAddress(byte[] addr) {
- try {
- return InetAddress.getByAddress(addr);
- } catch (UnknownHostException e) {
- throw new AssertionError(e);
- }
- }
-
- /**
- * Returns the string representation of an {@link InetAddress}.
- *
- * <p>For IPv4 addresses, this is identical to
- * {@link InetAddress#getHostAddress()}, but for IPv6 addresses, the output
- * follows <a href="http://tools.ietf.org/html/rfc5952">RFC 5952</a>
- * section 4. The main difference is that this method uses "::" for zero
- * compression, while Java's version uses the uncompressed form.
- *
- * <p>This method uses hexadecimal for all IPv6 addresses, including
- * IPv4-mapped IPv6 addresses such as "::c000:201". The output does not
- * include a Scope ID.
- *
- * @param ip {@link InetAddress} to be converted to an address string
- * @return {@code String} containing the text-formatted IP address
- * @since 10.0
- */
- public static String toAddrString(InetAddress ip) {
- Preconditions.checkNotNull(ip);
- if (ip instanceof Inet4Address) {
- // For IPv4, Java's formatting is good enough.
- return ip.getHostAddress();
- }
- Preconditions.checkArgument(ip instanceof Inet6Address);
- byte[] bytes = ip.getAddress();
- int[] hextets = new int[IPV6_PART_COUNT];
- for (int i = 0; i < hextets.length; i++) {
- hextets[i] = intFromBytes((byte) 0, (byte) 0, bytes[2 * i], bytes[2 * i + 1]);
- }
- compressLongestRunOfZeroes(hextets);
- return hextetsToIPv6String(hextets);
- }
-
- /**
- * Identify and mark the longest run of zeroes in an IPv6 address.
- *
- * <p>Only runs of two or more hextets are considered. In case of a tie, the
- * leftmost run wins. If a qualifying run is found, its hextets are replaced
- * by the sentinel value -1.
- *
- * @param hextets {@code int[]} mutable array of eight 16-bit hextets
- */
- private static void compressLongestRunOfZeroes(int[] hextets) {
- int bestRunStart = -1;
- int bestRunLength = -1;
- int runStart = -1;
- for (int i = 0; i < hextets.length + 1; i++) {
- if (i < hextets.length && hextets[i] == 0) {
- if (runStart < 0) {
- runStart = i;
- }
- } else if (runStart >= 0) {
- int runLength = i - runStart;
- if (runLength > bestRunLength) {
- bestRunStart = runStart;
- bestRunLength = runLength;
- }
- runStart = -1;
- }
- }
- if (bestRunLength >= 2) {
- Arrays.fill(hextets, bestRunStart, bestRunStart + bestRunLength, -1);
- }
- }
-
- /**
- * Convert a list of hextets into a human-readable IPv6 address.
- *
- * <p>In order for "::" compression to work, the input should contain negative
- * sentinel values in place of the elided zeroes.
- *
- * @param hextets {@code int[]} array of eight 16-bit hextets, or -1s
- */
- private static String hextetsToIPv6String(int[] hextets) {
- /*
- * While scanning the array, handle these state transitions:
- * start->num => "num" start->gap => "::"
- * num->num => ":num" num->gap => "::"
- * gap->num => "num" gap->gap => ""
- */
- StringBuilder buf = new StringBuilder(39);
- boolean lastWasNumber = false;
- for (int i = 0; i < hextets.length; i++) {
- boolean thisIsNumber = hextets[i] >= 0;
- if (thisIsNumber) {
- if (lastWasNumber) {
- buf.append(':');
- }
- buf.append(Integer.toHexString(hextets[i]));
- } else {
- if (i == 0 || lastWasNumber) {
- buf.append("::");
- }
- }
- lastWasNumber = thisIsNumber;
- }
- return buf.toString();
- }
-
- /**
- * Returns the string representation of an {@link InetAddress} suitable
- * for inclusion in a URI.
- *
- * <p>For IPv4 addresses, this is identical to
- * {@link InetAddress#getHostAddress()}, but for IPv6 addresses it
- * compresses zeroes and surrounds the text with square brackets; for example
- * {@code "[2001:db8::1]"}.
- *
- * <p>Per section 3.2.2 of
- * <a target="_parent"
- * href="http://tools.ietf.org/html/rfc3986#section-3.2.2"
- * >http://tools.ietf.org/html/rfc3986</a>,
- * a URI containing an IPv6 string literal is of the form
- * {@code "http://[2001:db8::1]:8888/index.html"}.
- *
- * <p>Use of either {@link InetAddresses#toAddrString},
- * {@link InetAddress#getHostAddress()}, or this method is recommended over
- * {@link InetAddress#toString()} when an IP address string literal is
- * desired. This is because {@link InetAddress#toString()} prints the
- * hostname and the IP address string joined by a "/".
- *
- * @param ip {@link InetAddress} to be converted to URI string literal
- * @return {@code String} containing URI-safe string literal
- */
- public static String toUriString(InetAddress ip) {
- if (ip instanceof Inet6Address) {
- return "[" + toAddrString(ip) + "]";
- }
- return toAddrString(ip);
- }
-
- /**
- * Returns an InetAddress representing the literal IPv4 or IPv6 host
- * portion of a URL, encoded in the format specified by RFC 3986 section 3.2.2.
- *
- * <p>This function is similar to {@link InetAddresses#forString(String)},
- * however, it requires that IPv6 addresses are surrounded by square brackets.
- *
- * <p>This function is the inverse of
- * {@link InetAddresses#toUriString(java.net.InetAddress)}.
- *
- * @param hostAddr A RFC 3986 section 3.2.2 encoded IPv4 or IPv6 address
- * @return an InetAddress representing the address in {@code hostAddr}
- * @throws IllegalArgumentException if {@code hostAddr} is not a valid
- * IPv4 address, or IPv6 address surrounded by square brackets
- */
- public static InetAddress forUriString(String hostAddr) {
- Preconditions.checkNotNull(hostAddr);
-
- // Decide if this should be an IPv6 or IPv4 address.
- String ipString;
- int expectBytes;
- if (hostAddr.startsWith("[") && hostAddr.endsWith("]")) {
- ipString = hostAddr.substring(1, hostAddr.length() - 1);
- expectBytes = 16;
- } else {
- ipString = hostAddr;
- expectBytes = 4;
- }
-
- // Parse the address, and make sure the length/version is correct.
- byte[] addr = ipStringToBytes(ipString);
- if (addr == null || addr.length != expectBytes) {
- throw formatIllegalArgumentException("Not a valid URI IP literal: '%s'", hostAddr);
- }
-
- return bytesToInetAddress(addr);
- }
-
- /**
- * Returns {@code true} if the supplied string is a valid URI IP string
- * literal, {@code false} otherwise.
- *
- * @param ipString {@code String} to evaluated as an IP URI host string literal
- * @return {@code true} if the argument is a valid IP URI host
- */
- public static boolean isUriInetAddress(String ipString) {
- try {
- forUriString(ipString);
- return true;
- } catch (IllegalArgumentException e) {
- return false;
- }
- }
-
- /**
- * Evaluates whether the argument is an IPv6 "compat" address.
- *
- * <p>An "IPv4 compatible", or "compat", address is one with 96 leading
- * bits of zero, with the remaining 32 bits interpreted as an
- * IPv4 address. These are conventionally represented in string
- * literals as {@code "::192.168.0.1"}, though {@code "::c0a8:1"} is
- * also considered an IPv4 compatible address (and equivalent to
- * {@code "::192.168.0.1"}).
- *
- * <p>For more on IPv4 compatible addresses see section 2.5.5.1 of
- * <a target="_parent"
- * href="http://tools.ietf.org/html/rfc4291#section-2.5.5.1"
- * >http://tools.ietf.org/html/rfc4291</a>
- *
- * <p>NOTE: This method is different from
- * {@link Inet6Address#isIPv4CompatibleAddress} in that it more
- * correctly classifies {@code "::"} and {@code "::1"} as
- * proper IPv6 addresses (which they are), NOT IPv4 compatible
- * addresses (which they are generally NOT considered to be).
- *
- * @param ip {@link Inet6Address} to be examined for embedded IPv4 compatible address format
- * @return {@code true} if the argument is a valid "compat" address
- */
- public static boolean isCompatIPv4Address(Inet6Address ip) {
- if (!ip.isIPv4CompatibleAddress()) {
- return false;
- }
-
- byte[] bytes = ip.getAddress();
- if ((bytes[12] == 0) && (bytes[13] == 0) && (bytes[14] == 0)
- && ((bytes[15] == 0) || (bytes[15] == 1))) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Returns the IPv4 address embedded in an IPv4 compatible address.
- *
- * @param ip {@link Inet6Address} to be examined for an embedded IPv4 address
- * @return {@link Inet4Address} of the embedded IPv4 address
- * @throws IllegalArgumentException if the argument is not a valid IPv4 compatible address
- */
- public static Inet4Address getCompatIPv4Address(Inet6Address ip) {
- Preconditions.checkArgument(isCompatIPv4Address(ip),
- "Address '%s' is not IPv4-compatible.", toAddrString(ip));
-
- return getInet4Address(Arrays.copyOfRange(ip.getAddress(), 12, 16));
- }
-
- private static IllegalArgumentException formatIllegalArgumentException(
- String format, Object... args) {
- return new IllegalArgumentException(String.format(Locale.ROOT, format, args));
- }
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
(activemq-artemis) 02/03: NO-JIRA remove dead code with invalid JavaDoc
Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 8eb52efadd241919eb25ff8359b04ff76babfbd5
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Tue Feb 18 13:49:31 2025 -0600
NO-JIRA remove dead code with invalid JavaDoc
---
.../jms/server/impl/JMSServerManagerImpl.java | 94 ----------------------
.../conform/connection/TopicConnectionTest.java | 56 ++-----------
2 files changed, 5 insertions(+), 145 deletions(-)
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 4fdf7f6b1f..4b8892e013 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -1522,100 +1522,6 @@ public class JMSServerManagerImpl extends CleaningActivateCallback implements JM
}
}
- /**
- * This class is responsible for auto-creating the JMS (and underlying core) resources when a client sends a message
- * to a non-existent JMS queue or topic
- */
-// class JMSDestinationCreator implements QueueCreator {
-//
-// @Override
-// public boolean create(SimpleString address) throws Exception {
-// AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
-// if (address.toString().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && settings.isAutoCreateQueues()) {
-// return internalCreateJMSQueue(false, address.toString().substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()), null, true, true);
-// } else if (address.toString().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX) && settings.isAutoCreateAddresses()) {
-// return createTopic(false, address.toString().substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()), true);
-// } else {
-// return false;
-// }
-// }
-// }
-
-// class JMSQueueDeleter implements QueueDeleter {
-//
-// @Override
-// public boolean delete(SimpleString queueName) throws Exception {
-// Queue queue = server.locateQueue(queueName);
-// SimpleString address = queue.getAddress();
-// AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
-// long consumerCount = queue.getConsumerCount();
-// long messageCount = queue.getMessageCount();
-//
-// if (address.toString().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && settings.isAutoDeleteJmsQueues() && queue.getMessageCount() == 0) {
-// if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) {
-// ActiveMQJMSServerLogger.LOGGER.debug("deleting auto-created queue \"" + queueName + ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; isAutoDeleteJmsQueues = " + settings.isAutoDeleteJmsQueues());
-// }
-//
-// return destroyQueue(queueName.toString().substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()), false);
-// } else {
-// return false;
-// }
-// }
-// }
-
- /**
- * When a core queue is created with a jms.topic prefix this class will create the associated JMS resources
- * retroactively. This would happen if, for example, a client created a subscription a non-existent JMS topic and
- * autoCreateJmsTopics = true.
- */
-// class JMSPostQueueCreationCallback implements PostQueueCreationCallback {
-//
-// @Override
-// public void callback(SimpleString queueName) throws Exception {
-// Queue queue = server.locateQueue(queueName);
-// String address = queue.getAddress().toString();
-//
-// AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
-// /* When a topic is created a dummy subscription is created which never receives any messages; when the queue
-// * for that dummy subscription is created we don't want to call createTopic again. Therefore we make sure the
-// * queue name doesn't start with the topic prefix.
-// */
-// if (address.toString().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX) && settings.isAutoCreateAddresses() && !queueName.toString().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)) {
-// createTopic(false, address.toString().substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()), true);
-// }
-// }
-// }
-
- /**
- * When a core queue representing a JMS topic subscription is deleted this class will check to see if that was the
- * last subscription on the topic and if so and autoDeleteJmsTopics = true then it will delete the JMS resources
- * for that topic.
- */
-// class JMSPostQueueDeletionCallback implements PostQueueDeletionCallback {
-//
-// @Override
-// public void callback(SimpleString address, SimpleString queueName) throws Exception {
-// Queue queue = server.locateQueue(address);
-// Collection<Binding> bindings = server.getPostOffice().getBindingsForAddress(address).getBindings();
-//
-// AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
-//
-// if (address.toString().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX) && settings.isAutoDeleteJmsTopics() && bindings.size() == 1 && queue != null && queue.isAutoCreated()) {
-// try {
-// destroyTopic(address.toString().substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length()));
-// } catch (IllegalStateException e) {
-// /*
-// * During shutdown the callback can be invoked after the JMSServerManager is already shut down so we just
-// * ignore the exception in that case
-// */
-// if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) {
-// ActiveMQJMSServerLogger.LOGGER.debug("Failed to destroy topic", e);
-// }
-// }
-// }
-// }
-// }
-
private final class JMSReloader implements ReloadCallback {
@Override
diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/TopicConnectionTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/TopicConnectionTest.java
index 7a94ab11f2..2302ce59c0 100644
--- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/TopicConnectionTest.java
+++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/TopicConnectionTest.java
@@ -25,16 +25,14 @@ import org.objectweb.jtests.jms.framework.PubSubTestCase;
/**
* Test topic-specific connection features.
- *
+ * <p>
* Test setting of client ID which is relevant only for Durable Subscription
*/
-
public class TopicConnectionTest extends PubSubTestCase {
/**
- * Test that a call to <code>setClientID</code> will throw an
- * <code>IllegalStateException</code> if a client ID has already been set
- * see JMS javadoc
+ * Test that a call to {@code setClientID} will throw an {@code IllegalStateException} if a client ID has already
+ * been set see JMS javadoc
* http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Connection.html#setClientID(java.lang.String)
*/
@Test
@@ -65,8 +63,8 @@ public class TopicConnectionTest extends PubSubTestCase {
}
/**
- * Test that a call to <code>setClientID</code> can occur only after connection creation
- * and before any other action on the connection.
+ * Test that a call to {@code setClientID} can occur only after connection creation and before any other action on
+ * the connection.
* <em>This test is relevant only if the ID is set by the JMS client</em>
* see JMS javadoc
* http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Connection.html#setClientID(java.lang.String)
@@ -97,48 +95,4 @@ public class TopicConnectionTest extends PubSubTestCase {
Assert.fail("Should raise a javax.jms.IllegalStateException, not a java.lang.IllegalStateException");
}
}
-
- /**
- * Test that if another connection with the same clientID is already running when
- * <code>setClientID</code> is called, the JMS provider should detect the duplicate
- * ID and throw an <code>InvalidClientIDException</code>
- * <em>This test is relevant only if the ID is set by the JMS client</em>
- * see JMS javadoc
- * http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Connection.html#setClientID(java.lang.String)
- *
- *... This test is not valid... as getClientID is caleld before setClientID
- */
- /*public void testSetClientID_3()
- {
- try
- {
- // we start from a clean state for the first connection
- subscriberConnection.close();
- subscriberConnection = null;
-
- subscriberConnection = subscriberTCF.createTopicConnection();
- // if the JMS provider has set a client ID, this test is not relevant
- if (subscriberConnection.getClientID() != null)
- {
- return;
- }
- // the JMS provider has not set a client ID, so we do
- subscriberConnection.setClientID("testSetClientID_3");
- assertEquals("testSetClientID_3", subscriberConnection.getClientID());
-
- // we create a new connection and try to set the same ID than for subscriberConnection
- TopicConnection connection_2 = subscriberTCF.createTopicConnection();
- assertTrue(connection_2.getClientID() == null);
- connection_2.setClientID("testSetClientID_3");
- fail("Should throw a javax.jms.InvalidClientIDException");
- }
- catch (InvalidClientIDException e)
- {
- }
- catch (JMSException e)
- {
- fail(e);
- }
- }*/
-
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@activemq.apache.org
For additional commands, e-mail: commits-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact