All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kie.remote.RemoteWorkingMemory Maven / Gradle / Ivy

/*
 * Copyright 2019 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.kie.remote;

import java.io.Serializable;
import java.util.Collection;
import java.util.concurrent.CompletableFuture;

public interface RemoteWorkingMemory {

    /**
     * @return the String Id of this entry point
     */
    String getEntryPointId();

    /**
     * 

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.

* @@return CompletableFuture of Collection to read all facts from the current session as a Collection. */ CompletableFuture getObjects(); /** * @param clazztype the filter to be applied to the returned collection of facts. * @@return CompletableFuture of Collection to read all facts from the current session that are accepted by the given ObjectFilter. */ CompletableFuture> getObjects(Class clazztype); /** * @param namedQuery the filter to be applied to the returned collection of facts. * @@param namedQuery name of the query to call * @@param objectName name of the object to read from the QueryResultsRow * @@param params for the rule * @@return CompletableFuture of Collection to read all facts from the current session that are accepted by the given ObjectFilter. */ CompletableFuture getObjects(String namedQuery, String objectName, Serializable... params); /** * @return a completable future with Long to read the total number of facts currently in this entry point */ CompletableFuture getFactCount(); /** * @param RemoteFactHandle to retrieve. * @@return CompletableFuture of to read related RemoteFactHandle. */ CompletableFuture getObject(RemoteFactHandle remoteFactHandle); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy