Package com.hazelcast.config
Class AttributeConfig
java.lang.Object
com.hazelcast.config.AttributeConfig
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
Contains the configuration of a custom attribute that will be extracted from a Map's entry using a given ValueExtractor.
This class should be used in combination with the
MapConfig
.- See Also:
-
Constructor Summary
ConstructorDescriptionCreates an empty AttributeConfig.AttributeConfig
(AttributeConfig config) AttributeConfig
(String name, String extractorClassName) Creates a AttributeConfig with the given attribute and ordered setting. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns type identifier for this class.Gets the full class name of the extractor in a String format, e.g.int
Returns DataSerializableFactory factory ID for this class.getName()
Gets the name of the attribute extracted by the extractor.int
hashCode()
void
Reads fields from the input streamsetExtractorClassName
(String extractorClassName) Sets the full class name of the extractor in a String format, e.g.Sets the name of the attribute extracted by the extractor.toString()
void
Writes object fields to output stream
-
Constructor Details
-
AttributeConfig
public AttributeConfig()Creates an empty AttributeConfig. -
AttributeConfig
Creates a AttributeConfig with the given attribute and ordered setting.Name may begin with an ascii letter [A-Za-z] or digit [0-9] and may contain ascii letters [A-Za-z], digits [0-9] or underscores later on.
- Parameters:
name
- the name given to an attribute that is going to be extractedextractorClassName
- full class name of the extractor used to extract the value of the attribute- See Also:
-
AttributeConfig
-
-
Method Details
-
getName
Gets the name of the attribute extracted by the extractor.- Returns:
- the name of the attribute extracted by the extractor
- See Also:
-
setName
Sets the name of the attribute extracted by the extractor. The name cannot be equal to any of the query constants.- Parameters:
name
- the name of the attribute extracted by the extractor- Returns:
- the updated AttributeConfig
- Throws:
IllegalArgumentException
- if attribute is null,an empty or inappropriate string- See Also:
-
getExtractorClassName
Gets the full class name of the extractor in a String format, e.g.com.example.car.SpeedExtractor
.- Returns:
- the full class name of the extractor in a String format
- See Also:
-
setExtractorClassName
Sets the full class name of the extractor in a String format, e.g.com.example.car.SpeedExtractor
.- Parameters:
extractorClassName
- the full class name of the extractor in a String format- Returns:
- the updated AttributeConfig
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
-
hashCode
public int hashCode()
-