Modifier and type | Property and description |
---|---|
protected java.util.concurrent.locks.ReadWriteLock | lock |
protected java.util.Map<K,V> | sharedStructure Replies the internal map that contains the spaces. |
ConcurrentCollection<T> | spaces Returns the collection of all spaces stored in this repository. |
Modifier and type | Type and description |
---|---|
class | SpaceRepository.SpaceDescription Description of a space. |
class | SpaceRepository.SpaceSpecificationKey Key for a space specification. |
Constructor and description |
---|
new(Injector,ExecutorService,LoggingService,SreConfig,SreSpaceSpecificationFactory,Provider<T>) Constructor. |
Modifier and type | Action and description |
---|---|
void | addSpaceRepositoryListener(SpaceRepositoryListener) Add listener on the space repository changes. |
OpenEventSpace | createDefaultSpace(SpaceID) Create an instance of the default space if it was not created before. |
protected java.util.logging.Logger | createLogger(LoggingService) Create the logger for this repository. |
S | createSpace(SpaceID,Class<T>,Object*) Create a space. |
protected SpaceDescription | createSpaceDescription(SpaceID,Space) Create a space description. |
protected S | createSpaceFirstInstance(Class<T>,SpaceID,Object) Create the first instance of a given space. |
final void | destroy Destroy this repository and release all the resources. |
void | destroyableSpace(Space) |
protected void | destroyThreadUnsafe Destroy this repository and release all the resources inside a synchronized section. |
protected void | fireSpaceAdded(Space,boolean) Notifies the listeners on the space creation. |
protected void | fireSpaceRemoved(Space,boolean) Notifies the listeners on the space destruction. |
protected java.util.concurrent.locks.ReadWriteLock | getLock |
S | getOrCreateSpaceWithID(SpaceID,Class<T>,Object*) Retrieve the first space of the given identifier, or create a space if none. |
S | getOrCreateSpaceWithSpec(SpaceID,Class<T>,Object*) Retrieve the first space of the given specification, or create a space if none. |
protected abstract java.util.Map<K,V> | getSharedStructure Replies the internal map that contains the spaces. |
Space | getSpace(SpaceID) Returns the first instance of a space with the specified SpaceID. |
ConcurrentCollection<T> | getSpaces Returns the collection of all spaces stored in this repository. |
ConcurrentCollection<T> | getSpaces(Class<T>) Returns the collection of all spaces with the specified SpaceSpecification stored in this repository. |
boolean | hasSpace(UUID) Replies if the given space was defined into the repository. |
protected SpaceDescription | life(Space,SpaceDescription) Replies the space information associated to the space if already associated. |
protected SpaceDescription | life(SpaceID,SpaceDescription) Replies the space information associated to the space identifier if already associated. |
void | refreshInternalStructures Synchronize the internal structures of SpaceRepository with the content of getSharedStructure(). |
protected void | removeEmptySpaces Remove all the spaces that are empty. |
void | removeSpace(Space) Remove the given space. |
void | removeSpaceIfEmpty(Space) Remove the given space if the it is empty, i.e. it has no more strong participant. |
void | removeSpaceIfEmpty(UUID) Remove the space with the given id if the space is empty, i.e. it has no more strong participant. |
void | removeSpaceRepositoryListener(SpaceRepositoryListener) Remove listener on the space repository changes. |
protected val lock : java.util.concurrent.locks.ReadWriteLock
This property is an alias for the action: getLock
protected val sharedStructure : java.util.Map<K,V>
This property is an alias for the action: getSharedStructure
val spaces : ConcurrentCollection<T>
This property is an alias for the action: getSpaces
protected val logger : java.util.logging.Logger
new(Injector,ExecutorService,LoggingService,SreConfig,SreSpaceSpecificationFactory,Provider<T>)
def addSpaceRepositoryListener(SpaceRepositoryListener)
def createDefaultSpace(SpaceID) : OpenEventSpace
protected def createLogger(LoggingService) : java.util.logging.Logger
def createSpace(SpaceID,Class<T>,Object*) : Swith S extends Space
protected def createSpaceDescription(SpaceID,Space) : SpaceDescription
protected def createSpaceFirstInstance(Class<T>,SpaceID,Object) : Swith S extends Space
def destroy
def destroyableSpace(Space)
protected def destroyThreadUnsafe
protected def fireSpaceAdded(Space,boolean)
protected def fireSpaceRemoved(Space,boolean)
protected def getLock : java.util.concurrent.locks.ReadWriteLock
def getOrCreateSpaceWithID(SpaceID,Class<T>,Object*) : Swith S extends Space
def getOrCreateSpaceWithSpec(SpaceID,Class<T>,Object*) : Swith S extends Space
protected def getSharedStructure : java.util.Map<K,V>
def getSpace(SpaceID) : Space
def getSpaces : ConcurrentCollection<T>
def getSpaces(Class<T>) : ConcurrentCollection<T>with S extends Space
def hasSpace(UUID) : boolean
protected def life(Space,SpaceDescription) : SpaceDescription
protected def life(SpaceID,SpaceDescription) : SpaceDescription
def refreshInternalStructures
protected def removeEmptySpaces
def removeSpace(Space)
def removeSpaceIfEmpty(Space)
def removeSpaceIfEmpty(UUID)
def removeSpaceRepositoryListener(SpaceRepositoryListener)