Hi, On Fri, Jun 13, 2014 at 7:20 AM, Chetan Mehrotra <[email protected]> wrote: > 1. Make NodeStore API extend Closeable
-1 No client of the of the API should need to close the store. Only the code that starts a NodeStore instance should be able to close it. > 2. Have the actual implementations (i.e. SegmentNodeStore and > DocumentNodeStore) implement Closeable and the close logic > does an instanceof check to determine if the NodeStore has to > be closed or not Why would the instanceof be needed? Whoever started a NodeStore instance (and thus is responsible for its lifecycle) already knows the implementation class and shouldn't need such checks. See for example the OakFixture class in oak-run, or the *NodeStoreService classes on oak-core for how the lifecycle is already being handled. The console code should IMHO do something similar. BR, Jukka Zitting
