Class DataSourceSetting
java.lang.Object
org.elasticsearch.xpack.esql.datasources.metadata.DataSourceSetting
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
A data source setting value plus its secret/non-secret classification, stored in cluster state. A
non-secret holds its plaintext value; a secret holds an
EncryptedData carrier directly (or
null), never raw plaintext — value instanceof EncryptedData is the discriminator.
Serialization delegates to EncryptedData's own Writeable/ToXContentObject
rather than re-encoding the bytes.-
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
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic DataSourceSettingfromXContent(XContentParser parser) inthashCode()booleanTrue iffrawValue()is an encrypted carrier rather than plaintext.Returns the value of a non-secret setting; throws if secret.Returns the masked sentinel for set secrets,nullfor wiped secrets, or the plaintext value for non-secrets.rawValue()Raw stored value — anEncryptedDatafor an encrypted secret, otherwise the plaintext value.booleansecret()toString()toXContent(XContentBuilder builder, ToXContent.Params params) 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
-
Field Details
-
MASK_SENTINEL
- See Also:
-
-
Constructor Details
-
DataSourceSetting
-
DataSourceSetting
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
secret
public boolean secret() -
isEncrypted
public boolean isEncrypted()True iffrawValue()is an encrypted carrier rather than plaintext. -
nonSecretValue
Returns the value of a non-secret setting; throws if secret. -
rawValue
Raw stored value — anEncryptedDatafor an encrypted secret, otherwise the plaintext value. -
presentationValue
Returns the masked sentinel for set secrets,nullfor wiped secrets, or the plaintext value for non-secrets. -
fromXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-