@Beta public abstract class DataConnectionBase extends Object implements DataConnection
DataConnection
implementations. Provides a ReferenceCounter
. When the ref count gets to 0, calls the DataConnection.destroy()
method.Modifier | Constructor and Description |
---|---|
protected |
DataConnectionBase(DataConnectionConfig config) |
Modifier and Type | Method and Description |
---|---|
DataConnectionConfig |
getConfig()
Returns the configuration of this DataConnection.
|
String |
getName()
Returns the name of this data connection as specified in the
DataConnectionConfig or the CREATE DATA CONNECTION
command. |
void |
release()
Release a retained data connection.
|
void |
retain()
Prevents the data connection from being closed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, listResources, options, resourceTypes
protected DataConnectionBase(@Nonnull DataConnectionConfig config)
@Nonnull public final String getName()
DataConnection
DataConnectionConfig
or the CREATE DATA CONNECTION
command.getName
in interface DataConnection
public final void retain()
DataConnection
Note that the DataConnection also isn't closed until all shared connections obtained from it are returned. This feature, together with the lock allows the processor to avoid concurrent close while it is using the connection.
retain
in interface DataConnection
public final void release()
DataConnection
DataConnection.retain()
call, otherwise the data connection will leak.release
in interface DataConnection
@Nonnull public final DataConnectionConfig getConfig()
DataConnection
getConfig
in interface DataConnection
Copyright © 2024 Hazelcast, Inc.. All rights reserved.