Alachisoft.NCache.Common.Extensibility.Client.RPC.Impl.MergableConsolidator 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;
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;
}
}