log.severe("The initialDataTopic for replication '" + replicationPrefix + "' was null"); // should never happen
this.cachedListOfReplications = null; // clear the cache
}
public synchronized void unregister(String senderSession, String replicationPrefix) {
I_Info oldInfo = (I_Info)this.replications.get(replicationPrefix);
if (oldInfo == null)
log.info("unregister '" + replicationPrefix + "' by senderSession='" + senderSession + "' is ignored since there is no such registration done");
else {
log.info("unregister '" + replicationPrefix + "' by senderSession='" + senderSession + "'");
/*
if (log.isLoggable(Level.FINE)) {
log.fine("unregister '" + replId + "' by senderSession='" + senderSession + "' the stack trace is:");
Thread.dumpStack();
}
*/
String oldSenderSession = oldInfo.get(SENDER_SESSION, senderSession);
if (oldSenderSession.equals(senderSession)) {
this.replications.remove(replicationPrefix);
}
else {
log.warning("unregister '" + replicationPrefix + "' by senderSession='" + senderSession + "' was not done since there is a registration done by '" + oldSenderSession + "'. Please do it with the correct Session");
}
String topicName = oldInfo.get("mom.topicName", null);
if (topicName != null) {
this.topicToPrefixMap.remove(topicName);
this.counterMap.remove(replicationPrefix);
}
}
String initialDataTopic = oldInfo.get("replication.initialDataTopic", "replication.initialData");
if (initialDataTopic != null)
this.initialDataTopicSet.remove(initialDataTopic);
else
log.severe("The initialDataTopic for replication '" + replicationPrefix + "' was null"); // should never happen
this.cachedListOfReplications = null; // clear the cache