Interface RemoteWorkingMemory

    • Method Detail

      • getEntryPointId

        String getEntryPointId()
        Returns:
        the String Id of this entry point
      • getObjects

        CompletableFuture<Collection> getObjects()

        This class is not a general-purpose Collection implementation! While this class implements the Collection interface, it intentionally violates Collection general contract, which mandates the use of the equals method when comparing objects.

        Instead the approach used when comparing objects with the contains(Object) method is dependent on the WorkingMemory configuration, where it can be configured for Identity or for Equality.

        Returns:
        CompletableFuture of Collection to read all facts from the current session as a Collection.
      • getObjects

        <T> CompletableFuture<Collection<T>> getObjects​(Class<T> clazztype)
        Parameters:
        clazztype - the filter to be applied to the returned collection of facts.
        Returns:
        CompletableFuture of Collection to read all facts from the current session that are accepted by the given ObjectFilter.
      • getObjects

        CompletableFuture<Collection> getObjects​(String namedQuery,
                                                 String objectName,
                                                 Serializable... params)
        Parameters:
        namedQuery - the filter to be applied to the returned collection of facts.
        namedQuery - name of the query to call
        objectName - name of the object to read from the QueryResultsRow
        params - for the rule
        Returns:
        CompletableFuture of Collection to read all facts from the current session that are accepted by the given ObjectFilter.
      • getFactCount

        CompletableFuture<Long> getFactCount()
        Returns:
        a completable future with Long to read the total number of facts currently in this entry point
      • getObject

        <T> CompletableFuture<T> getObject​(RemoteFactHandle<T> remoteFactHandle)
        Type Parameters:
        code - RemoteFactHandle to retrieve.
        Returns:
        CompletableFuture of to read related RemoteFactHandle.