Exemplo n.º 1
0
 static void sessionStopped(Session a_session) {
   i_sessions.remove(a_session);
 }
Exemplo n.º 2
0
 /**
  * opens an {@link ObjectContainer ObjectContainer} on the specified database file for local use.
  * <br>
  * <br>
  * Subsidiary calls with the same database file name will return the same {@link ObjectContainer
  * ObjectContainer} object.<br>
  * <br>
  * Every call to <code>openFile()</code> requires a corresponding {@link ObjectContainer#close
  * ObjectContainer.close}.<br>
  * <br>
  * Database files can only be accessed for readwrite access from one process (one Java VM) at one
  * time. All versions except for db4o mobile edition use an internal mechanism to lock the
  * database file for other processes. <br>
  * <br>
  *
  * @param databaseFileName the full path to the database file
  * @return an open {@link ObjectContainer ObjectContainer}
  * @see Configuration#readOnly
  * @see Configuration#encrypt
  * @see Configuration#password
  */
 public static final ObjectContainer openFile(String databaseFileName)
     throws DatabaseFileLockedException {
   synchronized (Db4o.lock) {
     return i_sessions.open(databaseFileName);
   }
 }
Exemplo n.º 3
0
 static void forEachSession(Visitor4 visitor) {
   i_sessions.forEach(visitor);
 }