@Beta public class DataConnectionConfig extends Object implements IdentifiedDataSerializable, NamedConfig
Constructor and Description |
---|
DataConnectionConfig() |
DataConnectionConfig(DataConnectionConfig config) |
DataConnectionConfig(String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
String |
getName()
Returns the name of this data connection.
|
Properties |
getProperties()
Returns all the properties of a data connection
|
String |
getProperty(String key)
Returns a single property of a data connection
|
String |
getProperty(String key,
String defaultValue)
Returns a single property of a data connection
|
String |
getType()
Returns the type of the
DataConnection |
int |
hashCode() |
boolean |
isShared()
true if an instance of the data connection will be reused. |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
DataConnectionConfig |
setName(String name)
Sets the name of this data connection, the name must be unique.
|
DataConnectionConfig |
setProperties(Properties properties)
Sets the properties of a data connection.
|
DataConnectionConfig |
setProperty(String key,
String value)
Sets a single property.
|
DataConnectionConfig |
setShared(boolean shared)
true if an instance of the data connection will be reused. |
DataConnectionConfig |
setType(String type)
Sets the type of the
DataConnection |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public DataConnectionConfig()
public DataConnectionConfig(DataConnectionConfig config)
public DataConnectionConfig(String name)
public DataConnectionConfig setName(String name)
setName
in interface NamedConfig
public String getName()
getName
in interface NamedConfig
public String getType()
DataConnection
public DataConnectionConfig setType(@Nonnull String type)
DataConnection
public boolean isShared()
true
if an instance of the data connection will be reused. false
when on each usage
the data connection instance should be created. The default is true
public DataConnectionConfig setShared(boolean shared)
true
if an instance of the data connection will be reused. false
when on each usage
the data connection instance should be createdshared
- if the data connection instance should be reusedpublic Properties getProperties()
@Nullable public String getProperty(String key)
key
- the property key of a data connection@Nullable public String getProperty(String key, String defaultValue)
key
- the property key of a data connectionpublic DataConnectionConfig setProperty(String key, String value)
setProperties(Properties)
key
- the property keyvalue
- the property valuepublic DataConnectionConfig setProperties(Properties properties)
DataConnection
for supported valuesproperties
- the properties to be setpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
Copyright © 2024 Hazelcast, Inc.. All rights reserved.