mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
23.48.2015 25eb96def3b1fb3aea5d69a631f848bcab95f1e9
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 23, 2015 11:48 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 23, 2015 11:48 +0200
commit25eb96def3b1fb3aea5d69a631f848bcab95f1e9
tree 7fa5330797d8b9ccda6e7ed51453c0b4a861f4c5 tree | zip | gz
parent b1952abf6f21d0fdd59cbe1346062868dd32281c view | diff
OPENDJ-1902 (CR-6667) Remove Storage.getWriteableTransaction()

Thanks to Yannick who showed me the way with r12096, I finally found how to do it.

*Storage.java:
Removed getWriteableStorage() and close() methods.

Importer.java:
In IndexDBWriteTask:
- In ctor, accept a Storage rather than a WriteableTransaction + renamed txn field to storage and changed its type from WriteableTransaction to Storage.
- In call(), extracted all code to call0(WriteableTransaction) + now only open a WriteableTransaction and call call0(WriteableTransaction) + propagate WriteableTransaction down the method calls
- renamed flushMapToDB() to flushToDB() + renamed map parameter to idSets and its type from Map to Collection.
- (Unrelated to this change) renamed doRebuildIndexes() to rebuildIndexes0().

ReadableTransaction.java:
No longer extends Closeable becasue it is not needed anymore.

5 files modified
157 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java 14 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java 98 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/TracedStorage.java 31 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/ReadableTransaction.java 7 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java 7 ●●●●● diff | view | raw | blame | history