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

Alachisoft.NCache.Common.Extensibility.Client.RPC.Impl.BooleanValueConsolidator Maven / Gradle / Ivy

There is a newer version: 5.3.3
Show newest version
package Alachisoft.NCache.Common.Extensibility.Client.RPC.Impl;


public class BooleanValueConsolidator extends MultiPartitionResponseConsolidator {
    /**
     * If any of the responses from the servers is equal to this boolean type, the consolidator will return that type without further merging the responses.
     * Default true.
     */
    public boolean ExpectedResult = true;

    @Override
    public Object GetFinalResponse() {
        if (_responses.size() > 0) {
            for (Object response : _responses.values()) {
                if ((boolean) response == ExpectedResult) {
                    return response;
                }
            }
        }

        return !ExpectedResult;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy