Module org.elasticsearch.xcore
Package org.elasticsearch.license
Class RemoteClusterLicenseChecker.LicenseCheck
java.lang.Object
org.elasticsearch.license.RemoteClusterLicenseChecker.LicenseCheck
- Enclosing class:
RemoteClusterLicenseChecker
Encapsulates a remote cluster license check. The check is either successful if the license of the remote cluster is compatible with
the predicate used to check license compatibility, or the check is a failure.
-
Method Summary
Modifier and TypeMethodDescriptionfailure(RemoteClusterLicenseChecker.RemoteClusterLicenseInfo remoteClusterLicenseInfo) Creates a failing license check encapsulating the specified remote cluster license info.booleanTest if this instance represents a successful license check.The remote cluster license info.success()A successful license check.
-
Method Details
-
remoteClusterLicenseInfo
The remote cluster license info. This method should only be invoked if this instance represents a failing license check.- Returns:
- the remote cluster license info
-
success
A successful license check.- Returns:
- a successful license check instance
-
isSuccess
public boolean isSuccess()Test if this instance represents a successful license check.- Returns:
- true if this instance represents a successful license check, otherwise false
-
failure
public static RemoteClusterLicenseChecker.LicenseCheck failure(RemoteClusterLicenseChecker.RemoteClusterLicenseInfo remoteClusterLicenseInfo) Creates a failing license check encapsulating the specified remote cluster license info.- Parameters:
remoteClusterLicenseInfo- the remote cluster license info- Returns:
- a failing license check
-