|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface BrooklynStorage
Method Summary | |
---|---|
java.util.concurrent.ConcurrentMap
|
getMap(java.lang.String id)
Creates a map backed by the storage-medium. |
Reference
|
getNonConcurrentList(java.lang.String id)
Creates a list backed by the storage-medium. |
Reference
|
getReference(java.lang.String id)
Creates a reference to a value, backed by the storage-medium. |
void
|
remove(java.lang.String id)
Removes the data stored against this id, whether it is a map, ref or whatever. |
void
|
terminate()
Terminates the BrooklynStorage. |
Method Detail |
---|
public java.util.concurrent.ConcurrentMap getMap(java.lang.String id)
@Beta public Reference getNonConcurrentList(java.lang.String id)
ReferenceTODO Aled says: Is getNonConcurrentList necessary? The purpose of this method, rather than just using Reference ref = getReference(id); ref.set(ImmutableList.of()) is to allow control of the serialization of the things inside the list (e.g. switching the Location object to serialize a proxy object of some sort). I don't want us to have to do deep inspection of every object being added to any map/ref. Feels like we can use normal serialization unless the top-level object matches an instanceof for special things like Entity, Location, etc. Peter responds: What I'm a bit scared of is that we need to write some kind of meta serialization mechanism on top of the mechanisms provided by e.g. Hazelcast or Infinispan. Hazelcast has a very extensive serialization library where you can plug in all kinds of serialization mechanisms.> ref = storage.
createNonConcurrentList("myid"); List newval = ImmutableList. builder().addAll(ref.get()).add("another").builder(); ref.set(newval);
public Reference getReference(java.lang.String id)
public void remove(java.lang.String id)
public void terminate()
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.