public class LocalSpaceRepository extends SpaceRepository
This repository is thread-safe.
SpaceRepository.SpaceDescription, SpaceRepository.SpaceSpecificationKey
logger
Constructor and Description |
---|
LocalSpaceRepository(injector : com.google.inject.Injector,
executor : ExecutorService,
loggingService : LoggingService,
config : SreConfig,
specificationFactory : SreSpaceSpecificationFactory,
internalStructure : Map<UUID,SpaceRepository.SpaceDescription>,
factories : javax.inject.Provider<Factories>)
Constructor.
|
LocalSpaceRepository(injector : com.google.inject.Injector,
executor : ExecutorService,
loggingService : LoggingService,
config : SreConfig,
specificationFactory : SreSpaceSpecificationFactory,
factories : javax.inject.Provider<Factories>)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Map<UUID,SpaceRepository.SpaceDescription> |
getSharedStructure()
Replies the internal map that contains the spaces.
|
addSpaceRepositoryListener, createDefaultSpace, createLogger, createSpace, createSpaceDescription, createSpaceFirstInstance, destroy, destroyableSpace, destroyThreadUnsafe, fireSpaceAdded, fireSpaceRemoved, getLock, getOrCreateSpaceWithID, getOrCreateSpaceWithSpec, getSpace, getSpaces, getSpaces, hasSpace, life, life, refreshInternalStructures, removeEmptySpaces, removeSpace, removeSpaceIfEmpty, removeSpaceIfEmpty, removeSpaceRepositoryListener
@Inject
public new
(injector : com.google.inject.Injector,
executor : ExecutorService,
loggingService : LoggingService,
config : SreConfig,
specificationFactory : SreSpaceSpecificationFactory,
factories : javax.inject.Provider<Factories>)
injector
- the injector.executor
- the asynchronous execution service.loggingService
- the logging service.config
- accessor to the configuration.specificationFactory
- the factory of space specifications.factories
- the provider of factories tool.public new
(injector : com.google.inject.Injector,
executor : ExecutorService,
loggingService : LoggingService,
config : SreConfig,
specificationFactory : SreSpaceSpecificationFactory,
internalStructure : Map<UUID,SpaceRepository.SpaceDescription>,
factories : javax.inject.Provider<Factories>)
injector
- the injector.executor
- the asynchronous execution service.loggingService
- the logging service.config
- the configuration.specificationFactory
- the factory of space specifications.factories
- the provider of factories tool.@Pure
protected def
getSharedStructure() : Map<UUID,SpaceRepository.SpaceDescription>
SpaceRepository
This function should not have a border effect; and it is therefore thread-safe.
This function shoud be invoked into a locked/synchronized block of code. That's why it does not need to reply a "concurrent" collection. Moreover, all the functions that are providing a collection of spaces to the outside of this class are creating a copy of the collection that is "concurrent".
getSharedStructure
in class SpaceRepository
Copyright © 2021 the original authors or authors.