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 Details

    • DataConnectionConfig

      public DataConnectionConfig()
    • DataConnectionConfig

      public DataConnectionConfig(DataConnectionConfig config)
    • DataConnectionConfig

      public DataConnectionConfig(String name)
  • Method Details

    • setName

      public DataConnectionConfig setName(String name)
      Sets the name of this data connection, the name must be unique.
      Specified by:
      setName in interface NamedConfig
      Returns:
      this DataConnectionConfig
    • getName

      public String getName()
      Returns the name of this data connection.
      Specified by:
      getName in interface NamedConfig
      Returns:
      the name of this data connection
    • getType

      public String getType()
      Returns the type of the DataConnection
    • setType

      public DataConnectionConfig setType(@Nonnull String type)
      Sets the type of the DataConnection
    • isShared

      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
      Returns:
      if the data connection instance should be reused
    • setShared

      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 created
      Parameters:
      shared - if the data connection instance should be reused
      Returns:
      this DataConnectionConfig
    • getProperties

      public Properties getProperties()
      Returns all the properties of a data connection
      Returns:
      all the properties of a data connection
    • getProperty

      @Nullable public String getProperty(String key)
      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

      @Nullable public String getProperty(String key, String defaultValue)
      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

      public DataConnectionConfig setProperty(String key, String value)
      Sets a single property. See setProperties(Properties)
      Parameters:
      key - the property key
      value - the property value
      Returns:
      this DataConnectionConfig
    • setProperties

      public DataConnectionConfig setProperties(Properties properties)
      Sets the properties of a data connection. See implementations of DataConnection for supported values
      Parameters:
      properties - the properties to be set
      Returns:
      this DataConnectionConfig
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • writeData

      public void writeData(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException 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 interface IdentifiedDataSerializable
      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 interface IdentifiedDataSerializable
      Returns:
      type ID