Package com.hazelcast.config
Class DataConnectionConfig
java.lang.Object
com.hazelcast.config.DataConnectionConfig
- All Implemented Interfaces:
NamedConfig,DataSerializable,IdentifiedDataSerializable
@Beta
public class DataConnectionConfig
extends Object
implements IdentifiedDataSerializable, NamedConfig
A configuration of a data connection that can be used:
- Since:
- 5.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.getName()Returns the name of this data connection.Returns all the properties of a data connectiongetProperty(String key) Returns a single property of a data connectiongetProperty(String key, String defaultValue) Returns a single property of a data connectiongetType()Returns the type of theDataConnectioninthashCode()booleanisShared()trueif an instance of the data connection will be reused.voidReads fields from the input streamSets the name of this data connection, the name must be unique.setProperties(Properties properties) Sets the properties of a data connection.setProperty(String key, String value) Sets a single property.setShared(boolean shared) trueif an instance of the data connection will be reused.Sets the type of theDataConnectiontoString()voidWrites object fields to output stream
-
Constructor Details
-
DataConnectionConfig
public DataConnectionConfig() -
DataConnectionConfig
-
DataConnectionConfig
-
-
Method Details
-
setName
Sets the name of this data connection, the name must be unique.- Specified by:
setNamein interfaceNamedConfig- Returns:
- this DataConnectionConfig
-
getName
Returns the name of this data connection.- Specified by:
getNamein interfaceNamedConfig- Returns:
- the name of this data connection
-
getType
Returns the type of theDataConnection -
setType
Sets the type of theDataConnection -
getProperties
Returns all the properties of a data connection- Returns:
- all the properties of a data connection
-
getProperty
Returns a single property of a data connection- Parameters:
key- the property key of a data connection- Returns:
- property value or null if the given key doesn't exist
-
getProperty
Returns a single property of a data connection- Parameters:
key- the property key of a data connection- Returns:
- property value or default value if the given key doesn't exist
-
setProperty
Sets a single property. SeesetProperties(Properties)- Parameters:
key- the property keyvalue- the property value- Returns:
- this DataConnectionConfig
-
setProperties
Sets the properties of a data connection. See implementations ofDataConnectionfor supported values- Parameters:
properties- the properties to be set- Returns:
- this DataConnectionConfig
-
equals
-
hashCode
public int hashCode() -
toString
-
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.
-
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
-