public IndexerIoModeHandler getModeHandler ( ) { if ( modeHandler == null ) { if ( ctx . getCache ( ) . getStatus ( ) != ComponentStatus . RUNNING ) { throw new IllegalStateException ( "The cache should be started first" ) ; } synchronized ( this ) { if ( modeHandler == null ) { this . modeHandler = new IndexerIoModeHandler ( cacheManager . isCoordinator ( ) || ctx . getCache ( ) . getAdvancedCache ( ) . getRpcManager ( ) == null ? IndexerIoMode . READ_WRITE : IndexerIoMode . READ_ONLY ) ; } } } return modeHandler ; }
Get the mode handler