- if (reply.getSone().equals(this) && replies.remove(reply)) {
- modificationCounter++;
- }
- }
-
- /**
- * Returns the IDs of all blocked Sones. These Sones will not propagated
- * using the “known Sones” mechanism.
- *
- * @return The IDs of all blocked Sones
- */
- public Set<String> getBlockedSoneIds() {
- return Collections.unmodifiableSet(blockedSoneIds);
- }
-
- /**
- * Returns whether the given Sone ID is blocked.
- *
- * @param soneId
- * The Sone ID to check
- * @return {@code true} if the given Sone ID is blocked, {@code false}
- * otherwise
- */
- public boolean isSoneBlocked(String soneId) {
- return blockedSoneIds.contains(soneId);
- }
-
- /**
- * Adds the given ID to the list of blocked IDs.
- *
- * @param soneId
- * The Sone ID to block
- */
- public synchronized void addBlockedSoneId(String soneId) {
- if (blockedSoneIds.add(soneId)) {
- modificationCounter++;
- }
- }
-
- /**
- * Removes the given ID from the list of blocked IDs.
- *
- * @param soneId
- * The Sone ID to unblock
- */
- public synchronized void removeBlockedSoneId(String soneId) {
- if (blockedSoneIds.remove(soneId)) {
- modificationCounter++;