Alachisoft.NCache.Common.Extensibility.Client.RPC.Impl.BooleanValueConsolidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-common Show documentation
Show all versions of nc-common Show documentation
Internal package of Alachisoft.
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;
}
}