Class Core


  • public class Core
    extends Object
    The main entry point into the core layer.

    This class has been around behind a facade in the 1.x days, but here it is just a plain simple class that can be instantiated and is used across the upper language bindings.

    Since:
    2.0.0
    • Method Detail

      • context

        public CoreContext context()
        Returns the CoreContext of this core instance.
        Returns:
        the core context.
      • openBucket

        @Internal
        public Mono<Void> openBucket​(String name)
        Attempts to open a bucket and fails the Mono if there is a persistent error as the reason.
      • clusterConfig

        @Internal
        public ClusterConfig clusterConfig()
        This API provides access to the current config that is published throughout the core.

        Note that this is internal API and might change at any time.

      • closeBucket

        @Internal
        public Mono<Void> closeBucket​(String name)
        Attempts to close a bucket and fails the Mono if there is a persistent error as the reason.
      • ensureServiceAt

        @Internal
        public Mono<Void> ensureServiceAt​(NodeIdentifier identifier,
                                          ServiceType serviceType,
                                          int port,
                                          Optional<String> bucket)
        This method can be used by a caller to make sure a certain service is enabled at the given target node.

        This is advanced, internal functionality and should only be used if the caller knows what they are doing.

        Parameters:
        identifier - the node to check.
        serviceType - the service type to enable if not enabled already.
        Returns:
        a Mono which completes once initiated.
      • shutdown

        @Internal
        public Mono<Void> shutdown()
        Shuts down this core and all associated, owned resources.