示例#1
0
文件: Db4o.java 项目: superyfwy/db4o
 static void sessionStopped(Session a_session) {
   i_sessions.remove(a_session);
 }
示例#2
0
文件: Db4o.java 项目: superyfwy/db4o
 /**
  * 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);
   }
 }
示例#3
0
文件: Db4o.java 项目: superyfwy/db4o
 static void forEachSession(Visitor4 visitor) {
   i_sessions.forEach(visitor);
 }