configuration.getLocation(), groupBuilder);
// Create the base constraints for the partition. These will
// be used to derive the constraints for the type specific
// partitions.
CacheControlConstraints base =
new CacheControlConstraints(
partitionConstraints.getConstraints(),
partitionConfiguration);
builder.setCacheControlDefaults(base.getDefaultCacheControl());
SeparateCacheControlConstraintsMap constraintsMap =
new SeparateCacheControlConstraintsMap();
for (Iterator i = PolicyType.getPolicyTypes().iterator(); i.hasNext();) {
PolicyType policyType = (PolicyType) i.next();
PolicyTypePartitionConfiguration typePartitionConfiguration =
partition.getTypePartition(policyType);
CacheControlConstraints typeConstraints;
groupBuilder = cacheFactory.createGroupBuilder();
if (typePartitionConfiguration == null) {
typeConstraints = base;
groupBuilder.setMaxCount(partitionSize);
} else {
RemotePolicyCacheConfiguration typeConfiguration =
typePartitionConfiguration.getConstraints();
if (typeConfiguration == null) {
typeConstraints = base;
} else {
typeConstraints = new CacheControlConstraints(base,
typeConfiguration);
}
groupBuilder.setMaxCount(typePartitionConfiguration.getSize());
}
partitionGroup.addGroup(policyType, groupBuilder);