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

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

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

import java.lang.reflect.InvocationTargetException;

public class MergableConsolidator extends MultiPartitionResponseConsolidator {
    private Class clazzOfT;

    @Override
    public Object GetFinalResponse() {
        IMergable finalResponse = null;
        try {
            finalResponse = clazzOfT.getDeclaredConstructor().newInstance();
        } catch (InstantiationException ignored) {
        } catch (IllegalAccessException e) {
        } catch (NoSuchMethodException e) {
        } catch (InvocationTargetException e) {
        }

        if (finalResponse != null) {
            finalResponse.BeginMerge();

            for (Object response : _responses.values()) {
                finalResponse = finalResponse.MergeWith((IMergable) response);
            }

            finalResponse.EndMerge();
        }
        return finalResponse;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy