Class DataSource
java.lang.Object
org.elasticsearch.xpack.esql.datasources.metadata.DataSource
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
Represents a data source definition stored in cluster state. A data source holds
connection settings (credentials, endpoints, auth) for an external data provider.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDataSource(String name, String type, String description, Map<String, DataSourceSetting> settings) DataSource(String name, String type, String description, DataSourceSettings settings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic DataSourcefromXContent(XContentParser parser) inthashCode()name()settings()toString()toXContent(XContentBuilder builder, ToXContent.Params params) Emits the in-memory plaintext representation, including secret values as-is.type()voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
DataSource
-
DataSource
public DataSource(String name, String type, @Nullable String description, DataSourceSettings settings) -
DataSource
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
name
-
type
-
description
-
settings
-
fromXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException Emits the in-memory plaintext representation, including secret values as-is. Used for cluster-state persistence (GATEWAY context only) and is not reached from the API or SNAPSHOT contexts becauseDataSourceMetadata.context()excludes both. Callers producing REST responses should route throughDataSourceSettings.toPresentationMap(). SeeDataSourceSettingfor the encryption-boundary contract.- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-