Class Store

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, ISerializableGraphStore

    @Generated(value="jsii-pacmak/1.82.0 (build 2d2ddd7)",
               date="2023-08-24T23:07:44.495Z")
    @Stability(Experimental)
    public class Store
    extends software.amazon.jsii.JsiiObject
    implements ISerializableGraphStore
    (experimental) Store class provides the in-memory database-like interface for managing all entities in the graph.
    • Constructor Detail

      • Store

        protected Store​(software.amazon.jsii.JsiiObjectRef objRef)
      • Store

        protected Store​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Store

        @Stability(Experimental)
        public Store​(@Nullable
                     Boolean allowDestructiveMutations)
        Parameters:
        allowDestructiveMutations -
      • Store

        @Stability(Experimental)
        public Store()
    • Method Detail

      • fromSerializedStore

        @Stability(Experimental)
        @NotNull
        public static Store fromSerializedStore​(@NotNull
                                                SGGraphStore serializedStore)
        (experimental) Builds store from serialized store data.

        Parameters:
        serializedStore - This parameter is required.
      • addEdge

        @Stability(Experimental)
        public void addEdge​(@NotNull
                            Edge edge)
        (experimental) Add edge to the store.

        Parameters:
        edge - This parameter is required.
      • addNode

        @Stability(Experimental)
        public void addNode​(@NotNull
                            Node node)
        (experimental) Add node to the store.

        Parameters:
        node - This parameter is required.
      • addStack

        @Stability(Experimental)
        public void addStack​(@NotNull
                             StackNode stack)
        (experimental) Add stack node to the store.

        Parameters:
        stack - This parameter is required.
      • addStage

        @Stability(Experimental)
        public void addStage​(@NotNull
                             StageNode stage)
        (experimental) Add stage to the store.

        Parameters:
        stage - This parameter is required.
      • clone

        @Stability(Experimental)
        @NotNull
        public Store clone​(@Nullable
                           Boolean allowDestructiveMutations)
        (experimental) Clone the store to allow destructive mutations.

        Parameters:
        allowDestructiveMutations - Indicates if destructive mutations are allowed;.
        Returns:
        Returns a clone of the store that allows destructive mutations
      • clone

        @Stability(Experimental)
        @NotNull
        public Store clone()
        (experimental) Clone the store to allow destructive mutations.

        Overrides:
        clone in class Object
        Returns:
        Returns a clone of the store that allows destructive mutations
      • computeLogicalUniversalId

        @Stability(Experimental)
        @NotNull
        public String computeLogicalUniversalId​(@NotNull
                                                StackNode stack,
                                                @NotNull
                                                String logicalId)
        (experimental) Compute universal logicalId based on parent stack and construct logicalId (<stack>:<logicalId>).

        Construct *logicalIds are only unique within their containing stack, so to use logicalId lookups universally (like resolving references) we need a universal key.

        Parameters:
        stack - This parameter is required.
        logicalId - This parameter is required.
      • findNodeByImportArn

        @Stability(Experimental)
        @Nullable
        public Node findNodeByImportArn​(@NotNull
                                        Object value)
        (experimental) Attempts to lookup the Node associated with a given *import arn token*.

        Parameters:
        value - Import arn value, which is either object to tokenize or already tokenized string. This parameter is required.
        Returns:
        Returns matching Node if found, otherwise undefined.
      • findNodeByLogicalId

        @Stability(Experimental)
        @NotNull
        public Node findNodeByLogicalId​(@NotNull
                                        StackNode stack,
                                        @NotNull
                                        String logicalId)
        (experimental) Find node within given stack with given logicalId.

        Parameters:
        stack - This parameter is required.
        logicalId - This parameter is required.
      • findNodeByLogicalUniversalId

        @Stability(Experimental)
        @NotNull
        public Node findNodeByLogicalUniversalId​(@NotNull
                                                 String uid)
        (experimental) Find node by universal logicalId (<stack>:<logicalId>).

        Parameters:
        uid - This parameter is required.
      • getEdge

        @Stability(Experimental)
        @NotNull
        public Edge getEdge​(@NotNull
                            String uuid)
        (experimental) Get stored edge by UUID.

        Parameters:
        uuid - This parameter is required.
      • getNode

        @Stability(Experimental)
        @NotNull
        public Node getNode​(@NotNull
                            String uuid)
        (experimental) Get stored node by UUID.

        Parameters:
        uuid - This parameter is required.
      • getStack

        @Stability(Experimental)
        @NotNull
        public StackNode getStack​(@NotNull
                                  String uuid)
        (experimental) Get stored stack node by UUID.

        Parameters:
        uuid - This parameter is required.
      • getStage

        @Stability(Experimental)
        @NotNull
        public StageNode getStage​(@NotNull
                                  String uuid)
        (experimental) Get stored stage node by UUID.

        Parameters:
        uuid - This parameter is required.
      • mutateRemoveEdge

        @Stability(Experimental)
        @NotNull
        public Boolean mutateRemoveEdge​(@NotNull
                                        Edge edge)
        (experimental) Remove edge from the store.

        Parameters:
        edge - This parameter is required.
      • mutateRemoveNode

        @Stability(Experimental)
        @NotNull
        public Boolean mutateRemoveNode​(@NotNull
                                        Node node)
        (experimental) Remove node from the store.

        Parameters:
        node - This parameter is required.
      • recordImportArn

        @Stability(Experimental)
        public void recordImportArn​(@NotNull
                                    String arnToken,
                                    @NotNull
                                    Node resource)
        (experimental) Records arn tokens from imported resources (eg: s3.Bucket.fromBucketArn()) that are used for resolving references.

        Parameters:
        arnToken - This parameter is required.
        resource - This parameter is required.
      • recordLogicalId

        @Stability(Experimental)
        public void recordLogicalId​(@NotNull
                                    StackNode stack,
                                    @NotNull
                                    String logicalId,
                                    @NotNull
                                    Node resource)
        (experimental) Record a universal logicalId to node mapping in the store.

        Parameters:
        stack - This parameter is required.
        logicalId - This parameter is required.
        resource - This parameter is required.
      • verifyDestructiveMutationAllowed

        @Stability(Experimental)
        public void verifyDestructiveMutationAllowed()
        (experimental) Verifies that the store allows destructive mutations.
      • getAllowDestructiveMutations

        @Stability(Experimental)
        @NotNull
        public Boolean getAllowDestructiveMutations()
        (experimental) Indicates if the store allows destructive mutations.

        Destructive mutations are only allowed on clones of the store to prevent plugins and filters from mutating the store for downstream plugins.

        All mutate* methods are only allowed on stores that allow destructive mutations.

        This behavior may change in the future if the need arises for plugins to pass mutated stores to downstream plugins. But it will be done cautiously with ensuring the intent of downstream plugin is to receive the mutated store.

      • getCounts

        @Stability(Experimental)
        @NotNull
        public IStoreCounts getCounts()
        (experimental) Get record of all store counters.
      • getEdges

        @Stability(Experimental)
        @NotNull
        public List<Edge> getEdges()
        (experimental) Gets all stored edges.
      • getNodes

        @Stability(Experimental)
        @NotNull
        public List<Node> getNodes()
        (experimental) Gets all stored nodes.
      • getRoot

        @Stability(Experimental)
        @NotNull
        public RootNode getRoot()
        (experimental) Root node in the store.

        The root node is not the computed root, but the graph root which is auto-generated and can not be mutated.

      • getRootStacks

        @Stability(Experimental)
        @NotNull
        public List<StackNode> getRootStacks()
        (experimental) Gets all stored root stack nodes.
      • getStacks

        @Stability(Experimental)
        @NotNull
        public List<StackNode> getStacks()
        (experimental) Gets all stored stack nodes.
      • getStages

        @Stability(Experimental)
        @NotNull
        public List<StageNode> getStages()
        (experimental) Gets all stored stage nodes.
      • getVersion

        @Stability(Experimental)
        @NotNull
        public String getVersion()
        (experimental) Current SemVer version of the store.