Alexey, My initial approach was to put reference into NodeLocalMap after "start" method since I saw no other possibility to do that since I was a little bit bit confused of - https://issues.apache.org/jira/browse/IGNITE-1018. But then I tried to go with LifecycleBean but with AFTER_NODE_START.
So, could you please clarify do I know can be coupled to BEFORE_NODE_START? And with regards to: >> If this is a requirement for you, you can put a simple CountDown latch to the NodeLocalMap, wait for it in an EntryProcessor and release it once the NodeLocalMap is in a consistent state. Here the question still remains the same - Where/when it is safe to put this CountDown latch into NodeLocalMap? Thanks, 2016-03-02 0:06 GMT+02:00 Alexey Goncharuk <[email protected]>: > Myron, > > What approach did you use initially to initialize the node local map? > IgniteNode is considered to be fully functional as soon as Ignition.start() > method returns control, so any operations done on NodeLocalMap after the > node start should be considered to be run concurrently with EntryProcessors > invocations. If this is a requirement for you, you can put a simple > CountDown latch to the NodeLocalMap, wait for it in an EntryProcessor and > release it once the NodeLocalMap is in a consistent state. > > It is safe to initialize the NodeLocalMap synchronously from > LifecycleBean's BEFORE_NODE_START event since the event notification is run > at the moment when the discovery SPI is not started yet and no other nodes > "know" about this starting node. > > As for the EntryProcessor resource injection, you can track this ticket > [1]. Looks like it is almost ready and will be merged to master pretty soon. > > -- > AG > > [1] https://issues.apache.org/jira/browse/IGNITE-2560 >
