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

Jean-Noel Rouvignac
23.48.2015 bc03d48b56388b73aa4d86409278177cfe41d43c
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
commitbc03d48b56388b73aa4d86409278177cfe41d43c
tree 591b650be1860ad06e56e162c746da31c75c65d1 tree | zip | gz
parent 71485a1c506655785f0eb98369a3509c42df0efd 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-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java 14 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java 98 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/TracedStorage.java 31 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/ReadableTransaction.java 7 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Storage.java 7 ●●●●● diff | view | raw | blame | history