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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns type identifier for this class.int
Returns 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 theDataConnection
int
hashCode()
boolean
isShared()
true
if an instance of the data connection will be reused.void
Reads 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) true
if an instance of the data connection will be reused.Sets the type of theDataConnection
toString()
void
Writes 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:
setName
in interfaceNamedConfig
- Returns:
- this DataConnectionConfig
-
getName
Returns the name of this data connection.- Specified by:
getName
in 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 ofDataConnection
for supported values- Parameters:
properties
- the properties to be set- Returns:
- this DataConnectionConfig
-
equals
-
hashCode
public int hashCode() -
toString
-
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.
-
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
-