public static ContextClusteringCommandCollection
getCommandCollection(AbstractContext[] contexts,
Map excludedReplicationPatterns) {
ArrayList commands = new ArrayList(contexts.length);
ContextClusteringCommandCollection collection =
new ContextClusteringCommandCollection(commands);
for (int i = 0; i < contexts.length; i++) {
ContextClusteringCommand cmd = getUpdateCommand(contexts[i],
excludedReplicationPatterns,
false);
if (cmd != null) {
commands.add(cmd);
}
}
collection.setUniqueId(UUIDGenerator.getUUID());
AckManager.addInitialAcknowledgement(collection);
return collection;
}