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

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

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

import Alachisoft.NCache.Common.Extensibility.Client.RPC.IResponseConsolidator;

public abstract class MultiPartitionResponseConsolidator implements IResponseConsolidator {
    protected java.util.HashMap _responses = new java.util.HashMap<>();

    public void CollectResponse(Object source, Object response) {
        if (source == null) {
            throw new IllegalArgumentException("Value cannot be null."+System.lineSeparator()+"Parameter name: sourceObject");
        }

        synchronized (_responses) {
            _responses.put(source, response);
        }
    }

    public abstract Object GetFinalResponse();


    public void Initialize() {

    }

    public void Reset() {
        synchronized (_responses) {
            _responses.clear();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy