org.red5.server.api.so

## Interface ISharedObject

All Superinterfaces:
  AttributeStoreMXBean, IAttributeStore, IBasicScope, ICastingAttributeStore, ICoreObject, IEventDispatcher, IEventHandler, IEventListener, IEventObservable, IScopeService, IServiceHandlerProvider, ISharedObjectBase, ISharedObjectHandlerProvider, ISharedObjectSecurityService

All Known Implementing Classes:
  SharedObjectScope

    public interface ISharedObject
    extends IBasicScope, ISharedObjectBase, ISharedObjectSecurityService

Serverside access to shared objects.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)

### Field Summary

### Fields inherited from interface org.red5.server.api.so.ISharedObjectSecurityService

`BEAN_NAME`

### Method Summary

Methods
`void` `acquire()` Prevent shared object from being released.
`ISharedObjectStatistics` `getStatistics()` Return statistics about the shared object.
`boolean` `isAcquired()` Check if shared object currently is acquired.
`void` `release()` Release previously acquired shared object.

### Methods inherited from interface org.red5.server.api.scope.IBasicScope

`getDepth, getName, getParent, getPath, getStore, getType, hasParent, isValid, setKeepDelay`

### Methods inherited from interface org.red5.server.api.event.IEventDispatcher

`dispatchEvent`

### Methods inherited from interface org.red5.server.api.event.IEventHandler

`handleEvent`

### Methods inherited from interface org.red5.server.api.event.IEventListener

`notifyEvent`

### Methods inherited from interface org.red5.server.api.event.IEventObservable

`addEventListener, getEventListeners, removeEventListener`

### Methods inherited from interface org.red5.server.api.so.ISharedObjectBase

`addSharedObjectListener, beginUpdate, beginUpdate, clear, close, endUpdate, getData, getVersion, isLocked, isPersistent, lock, removeSharedObjectListener, sendMessage, unlock`

### Methods inherited from interface org.red5.server.api.so.ISharedObjectHandlerProvider

`registerServiceHandler, unregisterServiceHandler`

### Methods inherited from interface org.red5.server.api.service.IServiceHandlerProvider

`getServiceHandler, getServiceHandlerNames, registerServiceHandler`

### Methods inherited from interface org.red5.server.api.ICastingAttributeStore

`getBoolAttribute, getByteAttribute, getDoubleAttribute, getIntAttribute, getListAttribute, getLongAttribute, getMapAttribute, getSetAttribute, getShortAttribute, getStringAttribute`

### Methods inherited from interface org.red5.server.api.IAttributeStore

`getAttribute, getAttribute, getAttributeNames, getAttributes, hasAttribute, removeAttribute, removeAttributes, setAttribute, setAttributes, setAttributes`

### Methods inherited from interface org.red5.server.api.so.ISharedObjectSecurityService

`getSharedObjectSecurity, registerSharedObjectSecurity, unregisterSharedObjectSecurity`

### Method Detail

#### acquire

    void acquire()

Prevent shared object from being released. Each call to `acquire` must be paired with a call to `release` so the SO isn't held forever. This method basically is a noop for persistent SOs as their data is stored and they can be released without losing their contents.

#### isAcquired

    boolean isAcquired()

Check if shared object currently is acquired.

Returns:
  `true` if the SO is acquired, otherwise `false`

#### release

    void release()

Release previously acquired shared object. If the SO is non-persistent, no more clients are connected the SO isn't acquired any more, the data is released.

#### getStatistics

    ISharedObjectStatistics getStatistics()

Return statistics about the shared object.

Returns:
  statistics