| | |
| | | /** |
| | | * Clear the contents of this entry container. |
| | | * |
| | | * @return The number of records deleted. |
| | | * @throws DatabaseException If an error occurs while removing the entry |
| | | * container. |
| | | */ |
| | | public long clear() throws DatabaseException |
| | | public void clear() throws DatabaseException |
| | | { |
| | | List<DatabaseContainer> databases = new ArrayList<DatabaseContainer>(); |
| | | listDatabases(databases); |
| | | long count = 0; |
| | | |
| | | for(DatabaseContainer db : databases) |
| | | { |
| | |
| | | { |
| | | for(DatabaseContainer db : databases) |
| | | { |
| | | count += env.truncateDatabase(txn, db.getName(), true); |
| | | env.truncateDatabase(txn, db.getName(), false); |
| | | } |
| | | |
| | | transactionCommit(txn); |
| | |
| | | { |
| | | for(DatabaseContainer db : databases) |
| | | { |
| | | count += env.truncateDatabase(null, db.getName(), true); |
| | | env.truncateDatabase(null, db.getName(), false); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return count; |
| | | } |
| | | |
| | | /** |