de.intarsys.tools.component
Interface IReferenceCounter


public interface IReferenceCounter

An object that is aware of its referents.

The object implements a reference counting mechanism that should behave like this:

If combined with the INotificationSupport, the object MAY trigger an AttributeChangedEvent upon acquire/release. In this case the ATTR_REFERENCECOUNT should be used to indicate the attribute.

If combined with the INotificationSupport, the object MAY trigger a DestroyedEvent when the reference count reaches 0.


Field Summary
static Attribute ATTR_REFERENCECOUNT
           
 
Method Summary
 void acquire()
           
 int getReferenceCount()
           
 void release()
           
 

Field Detail

ATTR_REFERENCECOUNT

static final Attribute ATTR_REFERENCECOUNT
Method Detail

acquire

void acquire()

getReferenceCount

int getReferenceCount()

release

void release()