private void init ( ) { ServerSideServerStore serverStore = ehcacheStateService . getStore ( storeIdentifier ) ; ServerStoreBinding serverStoreBinding = new ServerStoreBinding ( storeIdentifier , serverStore ) ; CompletableFuture < Void > r1 = managementRegistry . register ( serverStoreBinding ) ; ServerSideConfiguration . Pool pool = ehcacheStateService . getDedicatedResourcePool ( storeIdentifier ) ; CompletableFuture < Void > allOf ; if ( pool != null ) { allOf = CompletableFuture . allOf ( r1 , managementRegistry . register ( new PoolBinding ( storeIdentifier , pool , PoolBinding . AllocationType . DEDICATED ) ) ) ; } else { allOf = r1 ; } allOf . thenRun ( ( ) -> { managementRegistry . refresh ( ) ; managementRegistry . pushServerEntityNotification ( serverStoreBinding , EHCACHE_SERVER_STORE_CREATED . name ( ) ) ; } ) ; }
the goal of the following code is to send the management metadata from the entity into the monitoring tree AFTER the entity creation