| Modifier and Type | Field and Description |
|---|---|
private BeanDatabaseImpl |
currentDatabase |
private IterableProvider<BeanDatabaseUpdateListener> |
listeners |
private java.lang.Object |
lock |
private static java.util.concurrent.atomic.AtomicLong |
revisionCounter |
| Constructor and Description |
|---|
HubImpl() |
| Modifier and Type | Method and Description |
|---|---|
BeanDatabase |
getCurrentDatabase()
Gets the current database running in the system
|
WriteableBeanDatabase |
getWriteableDatabaseCopy()
Creates a writeable copy of the currently running
database.
|
(package private) void |
setCurrentDatabase(WriteableBeanDatabaseImpl writeableDatabase,
java.lang.Object commitMessage,
java.util.List<Change> changes) |
private static final java.util.concurrent.atomic.AtomicLong revisionCounter
private final java.lang.Object lock
private BeanDatabaseImpl currentDatabase
@Inject private IterableProvider<BeanDatabaseUpdateListener> listeners
public BeanDatabase getCurrentDatabase()
HubgetCurrentDatabase in interface Hubpublic WriteableBeanDatabase getWriteableDatabaseCopy()
HubWriteableBeanDatabase.commit()
method is called (and no other WriteableBeanDatabase.commit()
method has been called) then a read-only copye of the
WriteableBeanDatabase will become the current database.
There is no requirement to eventually call the
WriteableBeanDatabase.commit() methodgetWriteableDatabaseCopy in interface Hubvoid setCurrentDatabase(WriteableBeanDatabaseImpl writeableDatabase, java.lang.Object commitMessage, java.util.List<Change> changes)