+ * Returns whether the Sone with the given ID is a remote Sone.
+ *
+ * @param id
+ * The ID of the Sone to check
+ * @return {@code true} if the Sone with the given ID is a remote Sone,
+ * {@code false} otherwise
+ */
+ public boolean isRemoteSone(String id) {
+ synchronized (remoteSones) {
+ return remoteSones.containsKey(id);
+ }
+ }
+
+ /**
+ * Returns whether the given Sone is a new Sone. After this check, the Sone
+ * is marked as known, i.e. a second call with the same parameters will
+ * always yield {@code false}.
+ *
+ * @param sone
+ * The sone to check for
+ * @return {@code true} if the given Sone is new, false otherwise
+ */
+ public boolean isNewSone(Sone sone) {
+ synchronized (newSones) {
+ boolean isNew = !knownSones.contains(sone) && newSones.remove(sone);
+ knownSones.add(sone);
+ return isNew;
+ }
+ }
+
+ /**