@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 NamedConfigpublic String getName()
getName in interface NamedConfigpublic String getType()
DataConnectionpublic DataConnectionConfig setType(@Nonnull String type)
DataConnectionpublic 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 truepublic 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
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializableCopyright © 2023 Hazelcast, Inc.. All rights reserved.