brooklyn.internal.storage.Reference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-core Show documentation
Show all versions of brooklyn-core Show documentation
Entity implementation classes, events, and other core elements
package brooklyn.internal.storage;
/**
* A reference to a value, backed by the storage-medium.
*
* @see BrooklynStorage#getReference(String)
*
* @author aled
*/
public interface Reference {
// TODO We can add compareAndSet(T,T) as and when required
T get();
T set(T val);
/**
* @return true if the value is null; false otherwise.
*/
boolean isNull();
/**
* Sets the value back to null. Similar to {@code set(null)}.
*/
void clear();
/**
* @return true if the value equals the given parameter; false otherwise
*/
boolean contains(Object other);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy