@Override
@SuppressWarnings("unchecked")
public <T> T construct(Class<T> componentType) {
Class<?> componentImpl;
if (componentType.equals(ClusteringDependentLogic.class)) {
CacheMode cacheMode = configuration.clustering().cacheMode();
if (!cacheMode.isClustered()) {
return componentType.cast(new ClusteringDependentLogic.LocalLogic());
} else if (cacheMode.isInvalidation()) {
return componentType.cast(new ClusteringDependentLogic.InvalidationLogic());
} else if (cacheMode.isReplicated()) {
return componentType.cast(new ClusteringDependentLogic.ReplicationLogic());
} else {
return componentType.cast(new ClusteringDependentLogic.DistributionLogic());
}
} else {