Class TypedProperties
java.lang.Object
org.apache.activemq.artemis.utils.collections.TypedProperties
- Direct Known Subclasses:
TypedProperties
Property Value Conversion.
This implementation follows section 3.5.4 of the Java Message Service specification (Version 1.1 April 12, 2002).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionTypedProperties(Predicate<SimpleString> internalPropertyPredicate) TypedProperties(Predicate<SimpleString> internalPropertyPredicate, Predicate<SimpleString> amqpPropertyPredicate) TypedProperties(TypedProperties other) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanbooleanbooleanvoiddecode(io.netty.buffer.ByteBuf buffer) voiddecode(io.netty.buffer.ByteBuf buffer, TypedProperties.TypedPropertiesDecoderPools keyValuePools) intencode(io.netty.buffer.ByteBuf buffer) voidforEach(BiConsumer<SimpleString, Object> action) This method is read-only.voidforEachKey(Consumer<SimpleString> action) This method is read-only.getByteProperty(SimpleString key, Supplier<Byte> defaultValue) byte[]intgetMap()intgetProperty(SimpleString key) booleanisEmpty()voidputBooleanProperty(SimpleString key, boolean value) voidputByteProperty(SimpleString key, byte value) voidputBytesProperty(SimpleString key, byte[] value) voidputCharProperty(SimpleString key, char value) voidputDoubleProperty(SimpleString key, double value) voidputFloatProperty(SimpleString key, float value) voidputIntProperty(SimpleString key, int value) voidputLongProperty(SimpleString key, long value) voidputNullValue(SimpleString key) putProperty(SimpleString key, Object value) voidputShortProperty(SimpleString key, short value) voidputSimpleStringProperty(SimpleString key, SimpleString value) voidputTypedProperties(TypedProperties otherProps) static booleansearchProperty(SimpleString key, io.netty.buffer.ByteBuf buffer, int startIndex) Performs a search among the valid key properties contained inbuffer, starting fromfromassuming it to be a valid encodedTypedPropertiescontent.static voidsetObjectProperty(SimpleString key, Object value, TypedProperties properties) Helper for MapMessage#setObjectProperty(String, Object)intsize()Return the number of propertiestoString()
-
Constructor Details
-
TypedProperties
public TypedProperties() -
TypedProperties
-
TypedProperties
public TypedProperties(Predicate<SimpleString> internalPropertyPredicate, Predicate<SimpleString> amqpPropertyPredicate) -
TypedProperties
-
-
Method Details
-
size
public int size()Return the number of properties -
getMemoryOffset
public int getMemoryOffset() -
putBooleanProperty
-
putByteProperty
-
putBytesProperty
-
putShortProperty
-
putIntProperty
-
putLongProperty
-
putFloatProperty
-
putDoubleProperty
-
putSimpleStringProperty
-
putNullValue
-
putCharProperty
-
putTypedProperties
-
putProperty
-
getProperty
-
getBooleanProperty
-
getByteProperty
public Byte getByteProperty(SimpleString key, Supplier<Byte> defaultValue) throws ActiveMQPropertyConversionException -
getByteProperty
-
getCharProperty
-
getBytesProperty
-
getDoubleProperty
-
getIntProperty
-
getLongProperty
-
getShortProperty
-
getFloatProperty
-
getSimpleStringProperty
public SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException -
removeProperty
-
containsProperty
-
getPropertyNames
-
clearInternalProperties
public boolean clearInternalProperties() -
clearAMQPProperties
public boolean clearAMQPProperties() -
forEachKey
This method is read-only. Do not modify the TypedProperties using the Consumer.- Parameters:
action- Consumer implementation that should not modify the TypedProperties
-
forEach
This method is read-only. Do not modify the TypedProperties using the BiConsumer.- Parameters:
action- BiConsumer implementation that should not modify the TypedProperties
-
searchProperty
public static boolean searchProperty(SimpleString key, io.netty.buffer.ByteBuf buffer, int startIndex) Performs a search among the valid key properties contained inbuffer, starting fromfromassuming it to be a valid encodedTypedPropertiescontent.- Throws:
IllegalStateException- if any not-valid property is found while searching thekeyproperty
-
decode
public void decode(io.netty.buffer.ByteBuf buffer, TypedProperties.TypedPropertiesDecoderPools keyValuePools) -
decode
public void decode(io.netty.buffer.ByteBuf buffer) -
encode
public int encode(io.netty.buffer.ByteBuf buffer) -
getEncodeSize
public int getEncodeSize() -
clear
public void clear() -
toString
-
isEmpty
public boolean isEmpty() -
getMapNames
-
getMap
-
getReadLock
-
getWriteLock
-
setObjectProperty
Helper for MapMessage#setObjectProperty(String, Object)- Parameters:
key- The SimpleString keyvalue- The Object valueproperties- The typed properties
-