Package com.hazelcast.config
Class PredicateConfig
java.lang.Object
com.hazelcast.config.PredicateConfig
- All Implemented Interfaces:
DataSerializable,IdentifiedDataSerializable
Contains the configuration for an
Predicate. The configuration contains either the class name
of the Predicate implementation, or the actual Predicate instance.- Since:
- 3.5
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a PredicateConfig without className/implementation.PredicateConfig(PredicateConfig config) PredicateConfig(Predicate implementation) Creates a PredicateConfig with the given implementation.PredicateConfig(String className) Creates a PredicateConfig with the given className. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns type identifier for this class.Returns the name of the class of the Predicate.intReturns DataSerializableFactory factory ID for this class.Returns the Predicate implementation.getSql()Returns sql string for this config.inthashCode()voidReads fields from the input streamsetClassName(String className) Sets the class name of the Predicate.setImplementation(Predicate implementation) Sets the Predicate implementation.Sets sql string for this config.toString()voidWrites object fields to output stream
-
Field Details
-
className
-
sql
-
implementation
-
-
Constructor Details
-
PredicateConfig
public PredicateConfig()Creates a PredicateConfig without className/implementation. -
PredicateConfig
Creates a PredicateConfig with the given className.- Parameters:
className- the name of the Predicate class- Throws:
IllegalArgumentException- if className isnullor an empty String
-
PredicateConfig
-
PredicateConfig
Creates a PredicateConfig with the given implementation.- Parameters:
implementation- the implementation to use as Predicate- Throws:
IllegalArgumentException- if the implementation isnull
-
-
Method Details
-
getClassName
Returns the name of the class of the Predicate. If no class is specified,nullis returned.- Returns:
- the class name of the Predicate
- See Also:
-
setClassName
Sets the class name of the Predicate.If an implementation or sql was set, it will be removed.
- Parameters:
className- the name of the class of the Predicate- Returns:
- the updated PredicateConfig
- Throws:
IllegalArgumentException- if className isnullor an empty String- See Also:
-
getImplementation
Returns the Predicate implementation. If none has been specified,nullis returned.- Returns:
- the Predicate implementation
- See Also:
-
setImplementation
Sets the Predicate implementation.If a className or sql was set, it will be removed.
- Parameters:
implementation- the Predicate implementation- Returns:
- the updated PredicateConfig
- Throws:
IllegalArgumentException- the implementation isnull- See Also:
-
getSql
Returns sql string for this config.- Returns:
- sql string for this config
-
setSql
Sets sql string for this config.If a className or implementation was set, it will be removed.
- Parameters:
sql- sql string for this config- Returns:
- this configuration
-
equals
-
hashCode
public int hashCode() -
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-