This commit is contained in:
Clebert Suconic 2021-11-02 21:45:34 -04:00
commit f31122a722
422 changed files with 76 additions and 3556 deletions

View File

@ -456,8 +456,6 @@ public final class XmlDataExporter extends DBOption {
return queues;
}
// Inner classes -------------------------------------------------
/**
* Proxy to handle indenting the XML since <code>javax.xml.stream.XMLStreamWriter</code> doesn't support that.
*/

View File

@ -38,8 +38,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private static final SimpleString EMPTY = new SimpleString("");
private static final long serialVersionUID = 4204223851422244307L;
// Attributes
// ------------------------------------------------------------------------
private final byte[] data;
private transient int hash;
@ -49,8 +47,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
private transient String[] paths;
// Static
// ----------------------------------------------------------------------
/**
* Returns a SimpleString constructed from the {@code string} parameter.
@ -74,8 +70,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
return pool.getOrCreate(string);
}
// Constructors
// ----------------------------------------------------------------------
/**
* creates a SimpleString from a conventional String
@ -226,9 +220,6 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl
return toString().compareTo(o.toString());
}
// Public
// ---------------------------------------------------------------------------
/**
* returns the underlying byte array of this SimpleString
*

View File

@ -24,7 +24,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.SimpleString;
public class RandomUtil {
// Constants -----------------------------------------------------
protected static final Random random = new Random();
@ -32,9 +32,6 @@ public class RandomUtil {
return random;
}
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static String randomString() {
return java.util.UUID.randomUUID().toString();
@ -131,15 +128,4 @@ public class RandomUtil {
return RandomUtil.random.nextFloat();
}
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -206,7 +206,6 @@ public final class UUIDGenerator {
return null;
}
// Private -------------------------------------------------------
private static boolean isBlackList(final byte[] address) {
for (byte[] blackList : UUIDGenerator.BLACK_LIST) {

View File

@ -66,8 +66,6 @@ import java.util.Random;
* lock), and so has no method synchronization.
*/
public class UUIDTimer {
// // // Constants
/**
* Since System.longTimeMillis() returns time from january 1st 1970, and
* UUIDs need time from the beginning of gregorian calendar (15-oct-1582),
@ -245,11 +243,6 @@ public class UUIDTimer {
uuidData[UUID.INDEX_CLOCK_LO + 3] = (byte) clockLo;
}
/*
* /////////////////////////////////////////////////////////// // Private
* methods ///////////////////////////////////////////////////////////
*/
private static final int MAX_WAIT_COUNT = 50;
/**

View File

@ -630,8 +630,6 @@ public class TypedProperties {
return sb.append("]").toString();
}
// Private ------------------------------------------------------------------------------------
private synchronized void doPutValue(final SimpleString key, final PropertyValue value) {
if (!internalProperties && internalPropertyPredicate != null && internalPropertyPredicate.test(key)) {
internalProperties = true;
@ -676,8 +674,6 @@ public class TypedProperties {
}
}
// Inner classes ------------------------------------------------------------------------------
private abstract static class PropertyValue {
abstract Object getValue();

View File

@ -25,19 +25,12 @@ import org.junit.Before;
import org.junit.Test;
public class ConcurrentHashSetTest extends Assert {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private ConcurrentSet<String> set;
private String element;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test
public void testAdd() throws Exception {
@ -119,12 +112,4 @@ public class ConcurrentHashSetTest extends Assert {
set = new ConcurrentHashSet<>();
element = RandomUtil.randomString();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -25,9 +25,6 @@ import org.junit.Test;
public class TypedPropertiesConversionTest {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private TypedProperties props;
@ -35,12 +32,6 @@ public class TypedPropertiesConversionTest {
private final SimpleString unknownKey = new SimpleString("this.key.is.never.used");
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Before
public void setUp() throws Exception {
key = RandomUtil.randomSimpleString();
@ -298,12 +289,4 @@ public class TypedPropertiesConversionTest {
Assert.assertNull(props.getBytesProperty(unknownKey));
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -56,9 +56,7 @@ public class TypedPropertiesTest {
}
}
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
private TypedProperties props;

View File

@ -137,7 +137,6 @@ public final class AddressSettingsInfo {
private final boolean enableMetrics;
// Static --------------------------------------------------------
public static AddressSettingsInfo from(final String jsonString) {
JsonObject object = JsonUtil.readJsonObject(jsonString);
@ -200,7 +199,6 @@ public final class AddressSettingsInfo {
object.getBoolean("enableMetrics"));
}
// Constructors --------------------------------------------------
public AddressSettingsInfo(String addressFullMessagePolicy,
long maxSizeBytes,
@ -318,8 +316,6 @@ public final class AddressSettingsInfo {
this.enableMetrics = enableMetrics;
}
// Public --------------------------------------------------------
public int getPageCacheMaxSize() {
return pageCacheMaxSize;
}

View File

@ -34,7 +34,6 @@ public final class DayCounterInfo {
private final long[] counters;
// Static --------------------------------------------------------
public static String toJSON(final DayCounterInfo[] infos) {
JsonObjectBuilder json = JsonLoader.createObjectBuilder();
@ -73,15 +72,12 @@ public final class DayCounterInfo {
return infos;
}
// Constructors --------------------------------------------------
public DayCounterInfo(final String date, final long[] counters) {
this.date = date;
this.counters = counters;
}
// Public --------------------------------------------------------
/**
* Returns the date of the counter.
*/

View File

@ -28,7 +28,6 @@ import org.apache.activemq.artemis.core.message.impl.CoreMessage;
* Helper class to use ActiveMQ Artemis Core messages to manage server resources.
*/
public final class ManagementHelper {
// Constants -----------------------------------------------------
public static final SimpleString HDR_RESOURCE_NAME = new SimpleString("_AMQ_ResourceName");
@ -88,9 +87,6 @@ public final class ManagementHelper {
public static final SimpleString HDR_CLIENT_ID = new SimpleString("_AMQ_Client_ID");
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
/**
* Stores a resource attribute in a message to retrieve the value from the server resource.

View File

@ -66,7 +66,6 @@ public final class MessageCounterInfo {
return new MessageCounterInfo(name, subscription, durable, count, countDelta, depth, depthDelta, lastAddTimestamp, lastAckTimestamp, updateTimestamp);
}
// Constructors --------------------------------------------------
public MessageCounterInfo(final String name,
final String subscription,
@ -90,8 +89,6 @@ public final class MessageCounterInfo {
this.updateTimestamp = updateTimestamp;
}
// Public --------------------------------------------------------
/**
* Returns the name of the queue.
*/

View File

@ -27,14 +27,12 @@ import org.apache.activemq.artemis.api.core.RoutingType;
*/
public final class ObjectNameBuilder {
// Constants -----------------------------------------------------
/**
* Default JMX domain for ActiveMQ Artemis resources.
*/
public static final ObjectNameBuilder DEFAULT = new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), "localhost", true);
// Attributes ----------------------------------------------------
private final String domain;
@ -42,7 +40,6 @@ public final class ObjectNameBuilder {
private final boolean jmxUseBrokerName;
// Static --------------------------------------------------------
public static ObjectNameBuilder create(final String domain) {
if (domain == null) {
@ -68,7 +65,7 @@ public final class ObjectNameBuilder {
}
}
// Constructors --------------------------------------------------
private ObjectNameBuilder(final String domain, final String brokerName, boolean jmxUseBrokerName) {
this.domain = domain;
@ -76,8 +73,6 @@ public final class ObjectNameBuilder {
this.jmxUseBrokerName = jmxUseBrokerName;
}
// Public --------------------------------------------------------
/**
* Returns the ObjectName used by the single {@link ActiveMQServerControl}.
*/

View File

@ -47,8 +47,7 @@ import org.apache.activemq.artemis.utils.collections.PriorityLinkedListImpl;
import org.jboss.logging.Logger;
public final class ClientConsumerImpl implements ClientConsumerInternal {
// Constants
// ------------------------------------------------------------------------------------
private static final Logger logger = Logger.getLogger(ClientConsumerImpl.class);
@ -58,9 +57,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
public static final SimpleString FORCED_DELIVERY_MESSAGE = new SimpleString("_hornetq.forced.delivery.seq");
// Attributes
// -----------------------------------------------------------------------------------
private final ClientSessionInternal session;
private final SessionContext sessionContext;
@ -135,8 +131,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
private final ClassLoader contextClassLoader;
// Constructors
// ---------------------------------------------------------------------------------
public ClientConsumerImpl(final ClientSessionInternal session,
final ConsumerContext consumerContext,
@ -862,18 +857,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
}
}
// Public
// ---------------------------------------------------------------------------------------
// Package protected
// ---------------------------------------------------------------------------------------
// Protected
// ---------------------------------------------------------------------------------------
// Private
// ---------------------------------------------------------------------------------------
/**
* Sending an initial credit for slow consumers
*/
@ -1142,9 +1125,6 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
'}';
}
// Inner classes
// --------------------------------------------------------------------------------
private class Runner implements Runnable {
@Override

View File

@ -55,8 +55,6 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
super();
}
// Public --------------------------------------------------------
@Override
public int getEncodeSize() {
if (writableBuffer != null) {
@ -160,8 +158,6 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
}
}
// Inner classes -------------------------------------------------
private static class ActiveMQOutputStream extends OutputStream {
private final ActiveMQBuffer bufferOut;

View File

@ -64,9 +64,6 @@ public class ClientProducerImpl implements ClientProducerInternal {
private final ClientProducerCredits producerCredits;
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
public ClientProducerImpl(final ClientSessionInternal session,
final SimpleString address,
@ -195,8 +192,6 @@ public class ClientProducerImpl implements ClientProducerInternal {
return rateLimiter == null ? -1 : rateLimiter.getRate();
}
// Public ---------------------------------------------------------------------------------------
@Override
public ClientProducerCredits getProducerCredits() {
return producerCredits;

View File

@ -1959,9 +1959,6 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
connectionFailed(me, failedOver);
}
// Public
// ----------------------------------------------------------------------------
@Override
public void setForceNotSameRM(final boolean force) {
forceNotSameRM = force;

View File

@ -718,8 +718,6 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll
throw new UnsupportedOperationException();
}
// Inner classes -------------------------------------------------
@Override
public ByteBuf byteBuf() {
return null;

View File

@ -50,11 +50,9 @@ import org.apache.activemq.artemis.utils.UTF8Util;
* saveStream are called.
*/
public class LargeMessageControllerImpl implements LargeMessageController {
// Constants -----------------------------------------------------
private static final String READ_ONLY_ERROR_MESSAGE = "This is a read-only buffer, setOperations are not supported";
// Attributes ----------------------------------------------------
private final ClientConsumerInternal consumerInternal;
@ -94,9 +92,6 @@ public class LargeMessageControllerImpl implements LargeMessageController {
private final FileCache fileCache;
private boolean local = false;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public LargeMessageControllerImpl(final ClientConsumerInternal consumerInternal,
final long totalSize,
@ -127,8 +122,6 @@ public class LargeMessageControllerImpl implements LargeMessageController {
this.bufferSize = bufferSize;
}
// Public --------------------------------------------------------
public void setLocal(boolean local) {
this.local = local;
}

View File

@ -26,7 +26,7 @@ import org.apache.activemq.artemis.core.protocol.core.Packet;
import org.apache.activemq.artemis.utils.DataConstants;
public class PacketImpl implements Packet {
// Constants -------------------------------------------------------------------------
// 2.0.0
@ -287,14 +287,12 @@ public class PacketImpl implements Packet {
public static final byte DISCONNECT_V3 = -19;
// Static --------------------------------------------------------
public PacketImpl(final byte type) {
this.type = type;
}
// Public --------------------------------------------------------
public SimpleString convertName(SimpleString name) {
if (name == null) {
return null;

View File

@ -85,8 +85,6 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement
flush();
}
// Constructors
// ---------------------------------------------------------------------------------
/*
* Create a client side connection

View File

@ -25,9 +25,6 @@ public class ActiveMQExceptionMessage extends PacketImpl {
protected ActiveMQException exception;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQExceptionMessage(final ActiveMQException exception) {
super(EXCEPTION);
@ -39,8 +36,6 @@ public class ActiveMQExceptionMessage extends PacketImpl {
super(EXCEPTION);
}
// Public --------------------------------------------------------
@Override
public boolean isResponse() {
return true;

View File

@ -24,9 +24,7 @@ public class ActiveMQExceptionMessage_V2 extends ActiveMQExceptionMessage {
private long correlationID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQExceptionMessage_V2(final long correlationID, final ActiveMQException exception) {
super(exception);
@ -37,8 +35,6 @@ public class ActiveMQExceptionMessage_V2 extends ActiveMQExceptionMessage {
super();
}
// Public --------------------------------------------------------
@Override
public boolean isResponse() {
return true;

View File

@ -31,9 +31,6 @@ public class ClusterTopologyChangeMessage extends PacketImpl {
protected boolean last;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ClusterTopologyChangeMessage(final String nodeID,
final Pair<TransportConfiguration, TransportConfiguration> pair,
@ -61,8 +58,6 @@ public class ClusterTopologyChangeMessage extends PacketImpl {
super(CLUSTER_TOPOLOGY);
}
// Public --------------------------------------------------------
/**
* @param clusterTopologyV2
*/

View File

@ -49,8 +49,6 @@ public class CreateAddressMessage extends PacketImpl {
super(CREATE_ADDRESS);
}
// Public --------------------------------------------------------
@Override
protected String getPacketString() {
StringBuffer buff = new StringBuffer(super.getPacketString());

View File

@ -59,7 +59,6 @@ public class CreateQueueMessage extends PacketImpl {
super(CREATE_QUEUE);
}
// Public --------------------------------------------------------
/**
* @param createQueueMessageV2
*/

View File

@ -188,8 +188,6 @@ public class CreateQueueMessage_V2 extends CreateQueueMessage {
super(CREATE_QUEUE_V2);
}
// Public --------------------------------------------------------
public QueueConfiguration toQueueConfiguration() {
return new QueueConfiguration(queueName)
.setAddress(address)

View File

@ -108,8 +108,6 @@ public class CreateSessionMessage extends PacketImpl {
super(type);
}
// Public --------------------------------------------------------
public String getName() {
return name;
}

View File

@ -44,8 +44,6 @@ public class CreateSessionMessage_V2 extends CreateSessionMessage {
super(CREATESESSION_V2);
}
// Public --------------------------------------------------------
public String getClientID() {
return clientID;

View File

@ -54,8 +54,6 @@ public class CreateSharedQueueMessage extends PacketImpl {
super(packetType);
}
// Public --------------------------------------------------------
@Override
protected String getPacketString() {
StringBuffer buff = new StringBuffer(super.getPacketString());

View File

@ -21,15 +21,10 @@ import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class DisconnectMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
protected SimpleString nodeID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public DisconnectMessage(final SimpleString nodeID) {
super(DISCONNECT);
@ -45,8 +40,6 @@ public class DisconnectMessage extends PacketImpl {
super(disconnectV2);
}
// Public --------------------------------------------------------
public SimpleString getNodeID() {
return nodeID;
}

View File

@ -35,8 +35,6 @@ public class DisconnectMessage_V2 extends DisconnectMessage {
super(DISCONNECT_V2);
}
// Public --------------------------------------------------------
public SimpleString getScaleDownNodeID() {
return scaleDownNodeID;
}

View File

@ -46,8 +46,6 @@ public class DisconnectMessage_V3 extends DisconnectMessage {
super(DISCONNECT_V3);
}
// Public --------------------------------------------------------
public DisconnectReason getReason() {
return reason;
}

View File

@ -32,8 +32,6 @@ public class NullResponseMessage_V2 extends NullResponseMessage {
super();
}
// Public --------------------------------------------------------
@Override
public long getCorrelationID() {
return correlationID;

View File

@ -33,8 +33,6 @@ public class PacketsConfirmedMessage extends PacketImpl {
super(PACKETS_CONFIRMED);
}
// Public --------------------------------------------------------
public int getCommandID() {
return commandID;
}

View File

@ -37,8 +37,6 @@ public class ReattachSessionResponseMessage extends PacketImpl {
super(REATTACH_SESSION_RESP);
}
// Public --------------------------------------------------------
public int getLastConfirmedCommandID() {
return lastConfirmedCommandID;
}

View File

@ -41,8 +41,6 @@ public class SessionAcknowledgeMessage extends PacketImpl {
super(SESS_ACKNOWLEDGE);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -24,8 +24,6 @@ public class SessionCloseMessage extends PacketImpl {
super(SESS_CLOSE);
}
// Public --------------------------------------------------------
@Override
public boolean equals(final Object other) {
if (other instanceof SessionCloseMessage == false) {

View File

@ -33,8 +33,6 @@ public class SessionConsumerCloseMessage extends PacketImpl {
super(SESS_CONSUMER_CLOSE);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -34,8 +34,6 @@ public class SessionConsumerFlowCreditMessage extends PacketImpl {
super(SESS_FLOWTOKEN);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -41,8 +41,6 @@ public abstract class SessionContinuationMessage extends PacketImpl {
super(type);
}
// Public --------------------------------------------------------
/**
* @return the body
*/

View File

@ -20,17 +20,12 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class SessionExpireMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long consumerID;
private long messageID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionExpireMessage(final long consumerID, final long messageID) {
super(SESS_EXPIRED);
@ -44,8 +39,6 @@ public class SessionExpireMessage extends PacketImpl {
super(SESS_EXPIRED);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -20,9 +20,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class SessionIndividualAcknowledgeMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long consumerID;
@ -30,9 +28,6 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl {
private boolean requiresResponse;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionIndividualAcknowledgeMessage(final long consumerID,
final long messageID,
@ -50,8 +45,6 @@ public class SessionIndividualAcknowledgeMessage extends PacketImpl {
super(SESS_INDIVIDUAL_ACKNOWLEDGE);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -21,17 +21,12 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class SessionReceiveContinuationMessage extends SessionContinuationMessage {
// Constants -----------------------------------------------------
public static final int SESSION_RECEIVE_CONTINUATION_BASE_SIZE = SESSION_CONTINUATION_BASE_SIZE + DataConstants.SIZE_LONG;
// Attributes ----------------------------------------------------
private long consumerID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionReceiveContinuationMessage() {
super(SESS_RECEIVE_CONTINUATION);
@ -67,15 +62,11 @@ public class SessionReceiveContinuationMessage extends SessionContinuationMessag
return consumerID;
}
// Protected -----------------------------------------------------
@Override
public int expectedEncodeSize() {
return super.expectedEncodeSize() + DataConstants.SIZE_LONG;
}
// Public --------------------------------------------------------
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
super.encodeRest(buffer);

View File

@ -23,9 +23,6 @@ import org.apache.activemq.artemis.core.message.impl.CoreMessage;
import org.apache.activemq.artemis.utils.DataConstants;
public class SessionReceiveMessage extends MessagePacket {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
protected long consumerID;
@ -43,8 +40,6 @@ public class SessionReceiveMessage extends MessagePacket {
super(SESS_RECEIVE_MSG, message);
}
// Public --------------------------------------------------------
public long getConsumerID() {
return consumerID;
}

View File

@ -38,8 +38,6 @@ public class SessionRequestProducerCreditsMessage extends PacketImpl {
super(SESS_PRODUCER_REQUEST_CREDITS);
}
// Public --------------------------------------------------------
public int getCredits() {
return credits;
}

View File

@ -45,9 +45,7 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
*/
protected long messageBodySize = -1;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendContinuationMessage() {
super(SESS_SEND_CONTINUATION);
@ -96,8 +94,6 @@ public class SessionSendContinuationMessage extends SessionContinuationMessage {
this.messageBodySize = messageBodySize;
}
// Public --------------------------------------------------------
/**
* @return the requiresResponse
*/

View File

@ -28,9 +28,7 @@ public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMe
private long correlationID;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendContinuationMessage_V2() {
super();
@ -50,8 +48,6 @@ public class SessionSendContinuationMessage_V2 extends SessionSendContinuationMe
super(message, body, continues, requiresResponse, messageBodySize, handler);
}
// Public --------------------------------------------------------
@Override
public int expectedEncodeSize() {
return super.expectedEncodeSize() + DataConstants.SIZE_LONG;

View File

@ -28,9 +28,6 @@ public class SessionSendLargeMessage extends PacketImpl implements MessagePacket
*/
private Message largeMessage;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionSendLargeMessage(final Message largeMessage) {
super(SESS_SEND_LARGE);
@ -38,8 +35,6 @@ public class SessionSendLargeMessage extends PacketImpl implements MessagePacket
this.largeMessage = largeMessage;
}
// Public --------------------------------------------------------
public Message getLargeMessage() {
return largeMessage;
}

View File

@ -67,8 +67,6 @@ public class SessionSendMessage extends MessagePacket {
this.handler = null;
}
// Public --------------------------------------------------------
@Override
public boolean isRequiresResponse() {
return requiresResponse;

View File

@ -18,13 +18,6 @@ package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
public class SessionUniqueAddMetaDataMessage extends SessionAddMetaDataMessageV2 {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionUniqueAddMetaDataMessage() {
super(SESS_UNIQUE_ADD_METADATA);
@ -34,14 +27,4 @@ public class SessionUniqueAddMetaDataMessage extends SessionAddMetaDataMessageV2
super(SESS_UNIQUE_ADD_METADATA, key, data);
}
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -26,15 +26,10 @@ import org.apache.activemq.artemis.utils.XidCodecSupport;
* to be called after a failure on an XA Session
*/
public class SessionXAAfterFailedMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private Xid xid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionXAAfterFailedMessage(final Xid xid) {
super(SESS_XA_FAILED);
@ -46,8 +41,6 @@ public class SessionXAAfterFailedMessage extends PacketImpl {
super(SESS_XA_FAILED);
}
// Public --------------------------------------------------------
public Xid getXid() {
return xid;
}

View File

@ -41,8 +41,6 @@ public class SessionXAResponseMessage extends PacketImpl {
super(SESS_XA_RESP);
}
// Public --------------------------------------------------------
@Override
public boolean isResponse() {
return true;

View File

@ -32,8 +32,6 @@ public class SessionXAResponseMessage_V2 extends SessionXAResponseMessage {
super();
}
// Public --------------------------------------------------------
@Override
public long getCorrelationID() {
return correlationID;

View File

@ -36,8 +36,6 @@ public class SessionXAResumeMessage extends PacketImpl {
super(SESS_XA_RESUME);
}
// Public --------------------------------------------------------
public Xid getXid() {
return xid;
}

View File

@ -36,8 +36,6 @@ public class SessionXARollbackMessage extends PacketImpl {
super(SESS_XA_ROLLBACK);
}
// Public --------------------------------------------------------
public Xid getXid() {
return xid;
}

View File

@ -33,8 +33,6 @@ public class SessionXASetTimeoutMessage extends PacketImpl {
super(SESS_XA_SET_TIMEOUT);
}
// Public --------------------------------------------------------
public int getTimeoutSeconds() {
return timeoutSeconds;
}

View File

@ -33,8 +33,6 @@ public class SessionXASetTimeoutResponseMessage extends PacketImpl {
super(SESS_XA_SET_TIMEOUT_RESP);
}
// Public --------------------------------------------------------
@Override
public boolean isResponse() {
return true;

View File

@ -23,15 +23,10 @@ import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.utils.XidCodecSupport;
public class SessionXAStartMessage extends PacketImpl {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private Xid xid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public SessionXAStartMessage(final Xid xid) {
super(SESS_XA_START);
@ -43,8 +38,6 @@ public class SessionXAStartMessage extends PacketImpl {
super(SESS_XA_START);
}
// Public --------------------------------------------------------
public Xid getXid() {
return xid;
}

View File

@ -43,8 +43,6 @@ public class SubscribeClusterTopologyUpdatesMessage extends PacketImpl {
super(packetType);
}
// Public --------------------------------------------------------
public boolean isClusterConnection() {
return clusterConnection;
}

View File

@ -32,8 +32,6 @@ public class SubscribeClusterTopologyUpdatesMessageV2 extends SubscribeClusterTo
super(SUBSCRIBE_TOPOLOGY_V2);
}
// Public --------------------------------------------------------
@Override
public void encodeRest(final ActiveMQBuffer buffer) {
super.encodeRest(buffer);

View File

@ -134,7 +134,6 @@ public class NettyConnector extends AbstractConnector {
private static final Logger logger = Logger.getLogger(NettyConnector.class);
// Constants -----------------------------------------------------
public static final String JAVAX_KEYSTORE_PATH_PROP_NAME = "javax.net.ssl.keyStore";
public static final String JAVAX_KEYSTORE_PASSWORD_PROP_NAME = "javax.net.ssl.keyStorePassword";
public static final String JAVAX_KEYSTORE_TYPE_PROP_NAME = "javax.net.ssl.keyStoreType";
@ -176,7 +175,6 @@ public class NettyConnector extends AbstractConnector {
DEFAULT_CONFIG = Collections.unmodifiableMap(config);
}
// Attributes ----------------------------------------------------
private final boolean serverConnection;
@ -303,11 +301,6 @@ public class NettyConnector extends AbstractConnector {
private final ClientProtocolManager protocolManager;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public NettyConnector(final Map<String, Object> configuration,
final BufferHandler handler,
final BaseConnectionLifeCycleListener<?> listener,
@ -966,8 +959,6 @@ public class NettyConnector extends AbstractConnector {
}
}
// Public --------------------------------------------------------
public int getConnectTimeoutMillis() {
return connectTimeoutMillis;
}
@ -976,14 +967,6 @@ public class NettyConnector extends AbstractConnector {
this.connectTimeoutMillis = connectTimeoutMillis;
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
private static final class ActiveMQClientChannelHandler extends ActiveMQChannelHandler {
ActiveMQClientChannelHandler(final ChannelGroup group,

View File

@ -241,7 +241,6 @@ public class SSLSupport {
return supportedSuites.delete(supportedSuites.length() - 2, supportedSuites.length()).toString();
}
// Private -------------------------------------------------------
private TrustManagerFactory loadTrustManagerFactory() throws Exception {
if (trustManagerFactoryPlugin != null) {
return AccessController.doPrivileged((PrivilegedAction<TrustManagerFactory>) () -> ((TrustManagerFactoryPlugin) ClassloadingUtil.newInstanceFromClassLoader(SSLSupport.class, trustManagerFactoryPlugin)).getTrustManagerFactory());

View File

@ -39,7 +39,6 @@ public class XidImpl implements Xid, Serializable {
private boolean hashCalculated;
// Static --------------------------------------------------------
public static String toBase64String(final Xid xid) {
byte[] data = XidImpl.toByteArray(xid);
@ -62,7 +61,7 @@ public class XidImpl implements Xid, Serializable {
return hashBytes;
}
// Constructors --------------------------------------------------
/**
* Standard constructor
@ -88,8 +87,6 @@ public class XidImpl implements Xid, Serializable {
globalTransactionId = copyBytes(other.getGlobalTransactionId());
}
// Xid implementation ------------------------------------------------------------------
@Override
public byte[] getBranchQualifier() {
return branchQualifier;
@ -105,8 +102,6 @@ public class XidImpl implements Xid, Serializable {
return globalTransactionId;
}
// Public -------------------------------------------------------------------------------
@Override
public int hashCode() {
if (!hashCalculated) {
@ -160,7 +155,6 @@ public class XidImpl implements Xid, Serializable {
" base64:" + toBase64String(this);
}
// Private -------------------------------------------------------------------------------
private String stringRep(final byte[] bytes) {
StringBuffer buff = new StringBuffer();

View File

@ -37,7 +37,7 @@ public class VersionImpl implements Version, Serializable {
private final int[] compatibleVersionList;
// Constructors --------------------------------------------------
public VersionImpl(final String versionName,
final int majorVersion,

View File

@ -29,16 +29,9 @@ public class ActiveMQBufferInputStream extends InputStream {
/* (non-Javadoc)
* @see java.io.InputStream#read()
*/
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private ActiveMQBuffer bb;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
public ActiveMQBufferInputStream(final ActiveMQBuffer paramByteBuffer) {
bb = paramByteBuffer;
@ -137,12 +130,6 @@ public class ActiveMQBufferInputStream extends InputStream {
return false;
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
/**
* @return
*/
@ -150,6 +137,4 @@ public class ActiveMQBufferInputStream extends InputStream {
return bb.writerIndex() - bb.readerIndex();
}
// Inner classes -------------------------------------------------
}

View File

@ -24,9 +24,6 @@ import javax.naming.NamingException;
import java.util.StringTokenizer;
public class JNDIUtil {
// Constants -----------------------------------------------------
// Static --------------------------------------------------------
/**
* Create a context path recursively.
@ -89,17 +86,4 @@ public class JNDIUtil {
}
}
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -30,7 +30,6 @@ import java.util.List;
public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
// Constants ------------------------------------------------------------------------------------
/**
* Value used to indicate that all classes should be white or black listed,
@ -40,14 +39,10 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
public static final String WHITELIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.whitelist";
public static final String BLACKLIST_PROPERTY = "org.apache.activemq.artemis.jms.deserialization.blacklist";
// Attributes -----------------------------------------------------------------------------------
private List<String> whiteList = new ArrayList<>();
private List<String> blackList = new ArrayList<>();
// Static ---------------------------------------------------------------------------------------
// Constructors ---------------------------------------------------------------------------------
public ObjectInputStreamWithClassLoader(final InputStream in) throws IOException {
super(in);
@ -58,8 +53,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
setBlackList(blackList);
}
// Public ---------------------------------------------------------------------------------------
/**
* @return the whiteList configured on this policy instance.
*/
@ -98,10 +91,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
this.blackList = StringUtil.splitStringList(blackList, ",");
}
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
@Override
protected Class resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
if (System.getSecurityManager() == null) {
@ -138,7 +127,6 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
}
}
// Private --------------------------------------------------------------------------------------
private Class resolveClass0(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
String name = desc.getName();
@ -273,6 +261,4 @@ public class ObjectInputStreamWithClassLoader extends ObjectInputStream {
return false;
}
// Inner classes --------------------------------------------------------------------------------
}

View File

@ -18,7 +18,6 @@ package org.apache.activemq.artemis.utils;
public class SizeFormatterUtil {
// Constants -----------------------------------------------------
private static long oneKiB = 1024;
@ -26,10 +25,6 @@ public class SizeFormatterUtil {
private static long oneGiB = SizeFormatterUtil.oneMiB * 1024;
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static String sizeof(final long size) {
double s = Long.valueOf(size).doubleValue();
String suffix = "B";
@ -45,16 +40,4 @@ public class SizeFormatterUtil {
}
return String.format("%.2f %s", s, suffix);
}
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -44,25 +44,19 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
private int maxElements;
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public interface ValueCache {
boolean isLive();
}
// Constructors --------------------------------------------------
public SoftValueLongObjectHashMap(final int maxElements) {
this.maxElements = maxElements;
}
// Public --------------------------------------------------------
public void setMaxElements(final int maxElements) {
this.maxElements = maxElements;
checkCacheSize();
@ -336,12 +330,6 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
return mapDelegate.hashCode();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
@SuppressWarnings("unchecked")
private void processQueue() {
AggregatedSoftReference ref;
@ -355,8 +343,6 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
return new AggregatedSoftReference(key, value, refQueue);
}
// Inner classes -------------------------------------------------
static final class AggregatedSoftReference<V> extends SoftReference<V> {
final long key;

View File

@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicLong;
* </p>
*/
public class TimeAndCounterIDGenerator implements IDGenerator {
// Constants ----------------------------------------------------
/**
* Bits to move the date accordingly to MASK_TIME
@ -40,7 +40,6 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
private static final long TIME_ID_MASK = 0x7fffffffff000000L;
// Attributes ----------------------------------------------------
private final AtomicLong counter = new AtomicLong(0);
@ -48,17 +47,12 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
private volatile long tmMark;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public TimeAndCounterIDGenerator() {
refresh();
}
// Public --------------------------------------------------------
// Public --------------------------------------------------------
@Override
public long generateID() {
@ -136,12 +130,6 @@ public class TimeAndCounterIDGenerator implements IDGenerator {
")";
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private long newTM() {
return (System.currentTimeMillis() & TimeAndCounterIDGenerator.MASK_TIME) << TimeAndCounterIDGenerator.BITS_TO_MOVE;
}

View File

@ -392,6 +392,4 @@ public final class XMLUtil {
});
}
// Inner classes --------------------------------------------------------------------------------
}

View File

@ -23,11 +23,6 @@ import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
public class XidCodecSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
public static void encodeXid(final Xid xid, final ActiveMQBuffer out) {
out.writeInt(xid.getFormatId());
@ -50,15 +45,4 @@ public class XidCodecSupport {
return DataConstants.SIZE_INT * 3 + xid.getBranchQualifier().length + xid.getGlobalTransactionId().length;
}
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -26,16 +26,6 @@ import org.junit.Test;
public class TimeAndCounterIDGeneratorTest extends Assert {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test
public void testCalculation() {
TimeAndCounterIDGenerator seq = new TimeAndCounterIDGenerator();

View File

@ -25,9 +25,7 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class XMLUtilTest extends SilentTestCase {
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
@Test
public void testGetTextContext_1() throws Exception {

View File

@ -58,14 +58,11 @@ import static org.apache.activemq.artemis.reader.BytesMessageUtil.bytesWriteUTF;
*/
public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessage {
// Static -------------------------------------------------------
public static final byte TYPE = Message.BYTES_TYPE;
// Attributes ----------------------------------------------------
private int bodyLength;
// Constructor ---------------------------------------------------
/**
* This constructor is used to construct messages prior to sending
@ -352,7 +349,6 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag
reset();
}
// Public --------------------------------------------------------
@Override
public byte getType() {

View File

@ -66,7 +66,7 @@ import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
*/
public class ActiveMQConnection extends ActiveMQConnectionForContextImpl implements TopicConnection, QueueConnection {
// Constants ------------------------------------------------------------------------------------
public static final int TYPE_GENERIC_CONNECTION = 0;
public static final int TYPE_QUEUE_CONNECTION = 1;
@ -79,9 +79,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
public static final SimpleString CONNECTION_ID_PROPERTY_NAME = MessageUtil.CONNECTION_ID_PROPERTY_NAME;
// Static ---------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
private final int connectionType;
@ -137,7 +134,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
private final ConnectionFactoryOptions options;
// Constructors ---------------------------------------------------------------------------------
public ActiveMQConnection(final ConnectionFactoryOptions options,
final String username,
@ -502,8 +498,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return null; // we offer RA
}
// Public ---------------------------------------------------------------------------------------
/**
* Sets a FailureListener for the session which is notified if a failure occurs on the session.
*
@ -563,12 +557,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return initialSession;
}
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
// In case the user forgets to close the connection manually
@Override
protected final void finalize() throws Throwable {
if (!closed) {
@ -638,7 +626,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
return sessionFactory;
}
// Private --------------------------------------------------------------------------------------
/**
* @param transacted
@ -714,8 +701,6 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme
}
// Inner classes --------------------------------------------------------------------------------
private static class JMSFailureListener implements SessionFailureListener {
private final WeakReference<ActiveMQConnection> connectionRef;

View File

@ -868,10 +868,6 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio
return JMSFactoryType.CF.intValue();
}
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
protected synchronized ActiveMQConnection createConnectionInternal(final String username,
final String password,
final boolean isXA,
@ -947,7 +943,6 @@ public class ActiveMQConnectionFactory extends JNDIStorable implements Connectio
"]";
}
// Private --------------------------------------------------------------------------------------
private void checkWrite() {
if (readOnly) {

View File

@ -49,17 +49,13 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData {
JMS_MINOR_VERSION = Integer.valueOf(versionProps.getProperty("activemq.version.implementation.minorVersion", "0"));
}
// Constants -----------------------------------------------------
private static final String ACTIVEMQ = "ActiveMQ";
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
private final Version serverVersion;
// Constructors --------------------------------------------------
/**
* Create a new ActiveMQConnectionMetaData object.

View File

@ -37,9 +37,7 @@ import org.apache.activemq.artemis.utils.DestinationUtil;
* ActiveMQ Artemis implementation of a JMS Destination.
*/
public class ActiveMQDestination extends JNDIStorable implements Destination, Serializable {
// Constants -----------------------------------------------------
// Static --------------------------------------------------------
private static final long serialVersionUID = 5027962425462382883L;
@ -292,7 +290,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
return createTemporaryTopic(address, null);
}
// Attributes ----------------------------------------------------
/**
* The core address
@ -318,7 +315,7 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
private final transient ActiveMQSession session;
private transient boolean created;
// Constructors --------------------------------------------------
protected ActiveMQDestination(final String address,
final TYPE type,
@ -428,7 +425,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
return queue;
}
// Public --------------------------------------------------------
public String getAddress() {
return simpleAddress != null ? simpleAddress.toString() : null;
@ -512,14 +508,6 @@ public class ActiveMQDestination extends JNDIStorable implements Destination, Se
props.put("address", getAddress());
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
public enum TYPE {
QUEUE,
TOPIC,

View File

@ -37,19 +37,14 @@ import static org.apache.activemq.artemis.reader.MapMessageUtil.writeBodyMap;
* ActiveMQ Artemis implementation of a JMS MapMessage.
*/
public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.MAP_TYPE;
// Attributes ----------------------------------------------------
private final TypedProperties map = new TypedProperties();
private boolean invalid;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
/*
* This constructor is used to construct messages prior to sending
@ -89,7 +84,6 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
}
}
// Public --------------------------------------------------------
@Override
public byte getType() {
@ -335,11 +329,8 @@ public class ActiveMQMapMessage extends ActiveMQMessage implements MapMessage {
readBodyMap(message.getBodyBuffer(), map);
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
/**
* Check the name

View File

@ -63,7 +63,6 @@ import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.TOPIC_Q
*/
public class ActiveMQMessage implements javax.jms.Message {
// Constants -----------------------------------------------------
public static final byte TYPE = org.apache.activemq.artemis.api.core.Message.DEFAULT_TYPE;
public static final SimpleString OLD_QUEUE_QUALIFIED_PREFIX = SimpleString.toSimpleString(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX + PacketImpl.OLD_QUEUE_PREFIX);
@ -110,7 +109,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return jmsdata;
}
// Static --------------------------------------------------------
private static final HashSet<String> reservedIdentifiers = new HashSet<>();
@ -172,7 +170,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return msg;
}
// Attributes ----------------------------------------------------
// The underlying message
protected ClientMessage message;
@ -206,7 +203,6 @@ public class ActiveMQMessage implements javax.jms.Message {
private long jmsDeliveryTime;
// Constructors --------------------------------------------------
/*
* Create a new message prior to sending
@ -771,7 +767,6 @@ public class ActiveMQMessage implements javax.jms.Message {
return message.getBodySize() == 0;
}
// Public --------------------------------------------------------
public void setIndividualAcknowledge() {
this.individualAck = true;
@ -865,9 +860,7 @@ public class ActiveMQMessage implements javax.jms.Message {
return sb.toString();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
protected void checkWrite() throws JMSException {
if (readOnly) {
@ -881,8 +874,6 @@ public class ActiveMQMessage implements javax.jms.Message {
}
}
// Private ------------------------------------------------------------
private void checkStream() throws JMSException {
if (!(message.getType() == ActiveMQBytesMessage.TYPE || message.getType() == ActiveMQStreamMessage.TYPE)) {
throw ActiveMQJMSClientBundle.BUNDLE.onlyValidForByteOrStreamMessages();
@ -948,5 +939,4 @@ public class ActiveMQMessage implements javax.jms.Message {
}
}
// Inner classes -------------------------------------------------
}

View File

@ -66,7 +66,7 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
private final SimpleString autoDeleteQueueName;
// Constructors --------------------------------------------------
protected ActiveMQMessageConsumer(final ConnectionFactoryOptions options,
final ActiveMQConnection connection,
@ -180,7 +180,6 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
return noLocal;
}
// Public --------------------------------------------------------
@Override
public String toString() {
@ -191,11 +190,8 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
return consumer.isClosed();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private void checkClosed() throws JMSException {
if (consumer.isClosed() || session.getCoreSession().isClosed()) {
@ -265,6 +261,4 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
}
}
// Inner classes -------------------------------------------------
}

View File

@ -72,7 +72,6 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
private long defaultDeliveryDelay = Message.DEFAULT_DELIVERY_DELAY;
private final ActiveMQDestination defaultDestination;
// Constructors --------------------------------------------------
protected ActiveMQMessageProducer(final ActiveMQConnection connection,
final ClientProducer producer,
@ -326,7 +325,6 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
return (Queue) getDestination();
}
// Public --------------------------------------------------------
@Override
public String toString() {

View File

@ -38,20 +38,16 @@ import org.apache.activemq.artemis.utils.ObjectInputStreamWithClassLoader;
* Serialization is slooooow!
*/
public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.OBJECT_TYPE;
// Attributes ----------------------------------------------------
// keep a snapshot of the Serializable Object as a byte[] to provide Object isolation
private byte[] data;
private final ConnectionFactoryOptions options;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
protected ActiveMQObjectMessage(final ClientSession session, ConnectionFactoryOptions options) {
super(ActiveMQObjectMessage.TYPE, session);
@ -77,7 +73,6 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess
this.options = options;
}
// Public --------------------------------------------------------
@Override
public byte getType() {

View File

@ -27,14 +27,9 @@ import org.apache.activemq.artemis.api.core.SimpleString;
*/
public class ActiveMQQueue extends ActiveMQDestination implements Queue {
// Constants -----------------------------------------------------
private static final long serialVersionUID = -1106092883162295462L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQQueue() {
this((SimpleString) null);
}
@ -68,7 +63,6 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
// Queue implementation ------------------------------------------
// Public --------------------------------------------------------
@Override
public String getQueueName() {
@ -100,11 +94,5 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
return super.getAddress().hashCode();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -34,11 +34,7 @@ import org.apache.activemq.artemis.utils.SelectorTranslator;
* ActiveMQ Artemis implementation of a JMS QueueBrowser.
*/
public final class ActiveMQQueueBrowser implements QueueBrowser {
// Constants ------------------------------------------------------------------------------------
// Static ---------------------------------------------------------------------------------------
// Attributes -----------------------------------------------------------------------------------
private final ConnectionFactoryOptions options;
@ -52,7 +48,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser {
private final boolean enable1xPrefixes;
// Constructors ---------------------------------------------------------------------------------
protected ActiveMQQueueBrowser(final ConnectionFactoryOptions options,
final ActiveMQQueue queue,
@ -105,21 +101,12 @@ public final class ActiveMQQueueBrowser implements QueueBrowser {
return queue;
}
// Public ---------------------------------------------------------------------------------------
@Override
public String toString() {
return "ActiveMQQueueBrowser->" + consumer;
}
// Package protected ----------------------------------------------------------------------------
// Protected ------------------------------------------------------------------------------------
// Private --------------------------------------------------------------------------------------
// Inner classes --------------------------------------------------------------------------------
private final class BrowserEnumeration implements Enumeration<ActiveMQMessage> {
ClientMessage current = null;

View File

@ -120,7 +120,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
private final Map<String, Queue> queueCache = new ConcurrentHashMap<>();
// Constructors --------------------------------------------------
protected ActiveMQSession(final ConnectionFactoryOptions options,
final ActiveMQConnection connection,
@ -1139,7 +1138,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return (TopicSession) getSession();
}
// Public --------------------------------------------------------
@Override
public String toString() {
@ -1237,8 +1235,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return enable1xPrefixes;
}
// Package protected ---------------------------------------------
void deleteQueue(final SimpleString queueName) throws JMSException {
if (!session.isClosed()) {
try {
@ -1253,8 +1249,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return connection;
}
// Protected -----------------------------------------------------
void checkClosed() throws JMSException {
if (session.isClosed()) {
@ -1280,7 +1274,6 @@ public class ActiveMQSession implements QueueSession, TopicSession {
session.createQueue(queueConfiguration.setName(queueName).setAddress(destination.getAddress()).setAutoCreated(autoCreated).setDurable(durable));
}
// Private -------------------------------------------------------
private ActiveMQQueue lookupQueue(final String queueName, boolean isTemporary) throws ActiveMQException {
@ -1337,6 +1330,5 @@ public class ActiveMQSession implements QueueSession, TopicSession {
return topic;
}
}
// Inner classes -------------------------------------------------
}

View File

@ -76,7 +76,6 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess
message = new ClientMessageImpl((byte) 0, false, 0, 0, (byte) 4, 1500, null);
}
// Public --------------------------------------------------------
@Override
public byte getType() {

View File

@ -24,19 +24,13 @@ import javax.jms.TemporaryQueue;
* This class can be instantiated directly.
*/
public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQueue {
// Constants -----------------------------------------------------
private static final long serialVersionUID = -4624930377557954624L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
// TemporaryQueue implementation ------------------------------------------
// Public --------------------------------------------------------
public ActiveMQTemporaryQueue() {
this(null, null);
}
@ -74,11 +68,5 @@ public class ActiveMQTemporaryQueue extends ActiveMQQueue implements TemporaryQu
return super.getAddress().hashCode();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -20,15 +20,10 @@ import javax.jms.TemporaryTopic;
public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTopic {
// Constants -----------------------------------------------------
private static final long serialVersionUID = 845450764835635266L;
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTemporaryTopic() {
this(null, null);
}
@ -37,7 +32,6 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
super(address, true, session);
}
// Public --------------------------------------------------------
@Override
public boolean equals(final Object o) {
@ -59,12 +53,4 @@ public class ActiveMQTemporaryTopic extends ActiveMQTopic implements TemporaryTo
return super.getAddress().hashCode();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -34,19 +34,14 @@ import static org.apache.activemq.artemis.reader.TextMessageUtil.writeBodyText;
* This class was ported from SpyTextMessage in JBossMQ.
*/
public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage {
// Constants -----------------------------------------------------
public static final byte TYPE = Message.TEXT_TYPE;
// Attributes ----------------------------------------------------
// We cache it locally - it's more performant to cache as a SimpleString, the AbstractChannelBuffer write
// methods are more efficient for a SimpleString
private SimpleString text;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTextMessage(final ClientSession session) {
super(ActiveMQTextMessage.TYPE, session);
@ -65,7 +60,6 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage
setText(foreign.getText());
}
// Public --------------------------------------------------------
@Override
public byte getType() {

View File

@ -26,14 +26,10 @@ import org.apache.activemq.artemis.api.core.SimpleString;
* This class can be instantiated directly.
*/
public class ActiveMQTopic extends ActiveMQDestination implements Topic {
// Constants -----------------------------------------------------
private static final long serialVersionUID = 7873614001276404156L;
// Static --------------------------------------------------------
// Attributes ----------------------------------------------------
// Constructors --------------------------------------------------
public ActiveMQTopic() {
this((SimpleString) null);
}
@ -71,7 +67,6 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
return getName();
}
// Public --------------------------------------------------------
@Override
public String toString() {
@ -98,11 +93,5 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
return super.getAddress().hashCode();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -26,14 +26,12 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont
private final JMSBridge bridge;
// Constructors --------------------------------------------------
public JMSBridgeControlImpl(final JMSBridge bridge) throws Exception {
super(JMSBridgeControl.class);
this.bridge = bridge;
}
// Public --------------------------------------------------------
@Override
public void pause() throws Exception {
@ -207,18 +205,5 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont
bridge.setTargetUsername(name);
}
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -940,10 +940,6 @@ public final class JMSBridgeImpl implements JMSBridge {
this.tm = tm;
}
// Public ---------------------------------------------------------------------------
// Private -------------------------------------------------------------------
private synchronized void checkParams() {
checkNotNull(sourceCff, "sourceCff");
checkNotNull(targetCff, "targetCff");
@ -1747,8 +1743,6 @@ public final class JMSBridgeImpl implements JMSBridge {
return service;
}
// Inner classes ---------------------------------------------------------------
/**
* We use a Thread which polls the sourceDestination instead of a MessageListener
* to ensure that message delivery does not happen concurrently with

View File

@ -26,9 +26,6 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class PersistedBindings implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id;
@ -38,9 +35,6 @@ public class PersistedBindings implements EncodingSupport {
private ArrayList<String> bindings = new ArrayList<>();
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public PersistedBindings() {
}
@ -55,7 +49,6 @@ public class PersistedBindings implements EncodingSupport {
this.name = name;
}
// Public --------------------------------------------------------
@Override
public void decode(ActiveMQBuffer buffer) {
type = PersistedType.getType(buffer.readByte());
@ -138,12 +131,4 @@ public class PersistedBindings implements EncodingSupport {
bindings.remove(address);
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -23,9 +23,6 @@ import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfi
public class PersistedConnectionFactory implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id;
@ -43,11 +40,7 @@ public class PersistedConnectionFactory implements EncodingSupport {
this.config = config;
}
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
/**
* @return the id
@ -87,12 +80,4 @@ public class PersistedConnectionFactory implements EncodingSupport {
return config.getEncodeSize();
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
}

View File

@ -24,9 +24,6 @@ import org.apache.activemq.artemis.utils.DataConstants;
public class PersistedDestination implements EncodingSupport {
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
private long id;
@ -37,9 +34,6 @@ public class PersistedDestination implements EncodingSupport {
private String selector;
private boolean durable;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public PersistedDestination() {
}
@ -57,15 +51,6 @@ public class PersistedDestination implements EncodingSupport {
this.selector = selector;
this.durable = durable;
}
// Public --------------------------------------------------------
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
public long getId() {
return id;

View File

@ -46,7 +46,7 @@ import org.apache.activemq.artemis.utils.IDGenerator;
public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
// Constants -----------------------------------------------------
public static final byte CF_RECORD = 1;
@ -54,7 +54,6 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
public static final byte BINDING_RECORD = 3;
// Attributes ----------------------------------------------------
private final IDGenerator idGenerator;
@ -72,9 +71,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
private final Configuration config;
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
public JMSJournalStorageManagerImpl(ExecutorFactory ioExecutors,
final IDGenerator idGenerator,
final Configuration config,
@ -101,7 +98,6 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
this.idGenerator = idGenerator;
}
// Public --------------------------------------------------------
@Override
public List<PersistedConnectionFactory> recoverConnectionFactories() {
List<PersistedConnectionFactory> cfs = new ArrayList<>(mapFactories.values());
@ -280,11 +276,8 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
}
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
// Private -------------------------------------------------------
private void checkAndCreateDir(final File dir, final boolean create) {
@ -299,6 +292,5 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager {
}
}
// Inner classes -------------------------------------------------
}

Some files were not shown because too many files have changed in this diff Show More