}
/**
- * Returns all Sones, remote and local.
- *
- * @return All Sones
+ * {@inheritDocs}
*/
- public Set<Sone> getSones() {
- return new HashSet<Sone>(sones.values());
+ @Override
+ public Collection<Sone> getSones() {
+ synchronized (sones) {
+ return Collections.unmodifiableCollection(sones.values());
+ }
}
/**
}
/**
- * Returns all local Sones.
- *
- * @return All local Sones
+ * {@inheritDocs}
*/
+ @Override
public Collection<Sone> getLocalSones() {
synchronized (sones) {
return Collections2.filter(sones.values(), new Predicate<Sone>() {
}
/**
- * Returns all remote Sones.
- *
- * @return All remote Sones
+ * {@inheritDocs}
*/
+ @Override
public Collection<Sone> getRemoteSones() {
synchronized (sones) {
return Collections2.filter(sones.values(), new Predicate<Sone>() {
}
/**
+ * {@inheritDocs}
+ */
+ @Override
+ public Collection<Post> getPosts(String soneId) {
+ return postDatabase.getPosts(soneId);
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
}
}
synchronized (sones) {
+ sone.setOptions(storedSone.get().getOptions());
sones.put(sone.getId(), sone);
}
}