@Beta public class HazelcastDataLink extends DataLinkBase implements DataLink
Set the client XML as property using CLIENT_XML
as property key or
Set the client YAML as property using CLIENT_YML
as property key
Modifier and Type | Field and Description |
---|---|
static String |
CLIENT_XML
The constant to be used as property key for XML
|
static String |
CLIENT_YML
The constant to be used as property key for YAML
|
Constructor and Description |
---|
HazelcastDataLink(DataLinkConfig dataLinkConfig) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called by the member when shutting down.
|
HazelcastInstance |
getClient()
Return a client
HazelcastInstance based on this DataLink configuration. |
Collection<DataLinkResource> |
listResources()
Returns list of
DataLinkResource s accessible via this DataLink. |
getConfig, getName, release, retain
public static final String CLIENT_XML
public static final String CLIENT_YML
public HazelcastDataLink(@Nonnull DataLinkConfig dataLinkConfig)
@Nonnull public Collection<DataLinkResource> listResources()
DataLink
DataLinkResource
s accessible via this DataLink.
It is not strictly required that the data link lists all resources; a resource can be used even if it is not listed. For example, the list of resources in Oracle database might not include tables available through a database link. In fact, it might list no resources at all, perhaps if the security in the target system prevents reading of such a list.
The returned list contains up-to-date list of resources. Any changes (added or removed resources) must be reflected in subsequent calls to this method.
listResources
in interface DataLink
@Nonnull public HazelcastInstance getClient()
HazelcastInstance
based on this DataLink configuration.
Depending on the DataLinkConfig.isShared()
config the HazelcastInstance is
- shared=true -> a single instance is created
- shared=false -> a new instance is created each time the method is called
The caller must call `shutdown` on the instance when finished to allow correct release of the underlying resources. In case of a shared instance, the instance is shut down when all users call the shutdown method and this DataLink is released. In case of a non-shared instance, the instance is shutdown immediately when the shutdown method is called.
Copyright © 2023 Hazelcast, Inc.. All rights reserved.