Search in sources :

Example 1 with MessageReferenceImpl

use of org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl in project activemq-artemis by apache.

the class MemorySizeTest method testObjectSizes.

@Test
public void testObjectSizes() throws Exception {
    UnitTestLogger.LOGGER.info("Server message size is " + MemorySize.calculateSize(new MemorySize.ObjectFactory() {

        @Override
        public Object createObject() {
            return new CoreMessage(1, 1000);
        }
    }));
    UnitTestLogger.LOGGER.info("Message reference size is " + MemorySize.calculateSize(new MemorySize.ObjectFactory() {

        @Override
        public Object createObject() {
            return new MessageReferenceImpl();
        }
    }));
}
Also used : MemorySize(org.apache.activemq.artemis.utils.MemorySize) MessageReferenceImpl(org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl) CoreMessage(org.apache.activemq.artemis.core.message.impl.CoreMessage) Test(org.junit.Test)

Aggregations

CoreMessage (org.apache.activemq.artemis.core.message.impl.CoreMessage)1 MessageReferenceImpl (org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl)1 MemorySize (org.apache.activemq.artemis.utils.MemorySize)1 Test (org.junit.Test)1