private void registerGlobalTxTable ( GlobalComponentRegistry globalComponentRegistry ) { InternalCacheRegistry registry = globalComponentRegistry . getComponent ( InternalCacheRegistry . class ) ; ConfigurationBuilder builder = new ConfigurationBuilder ( ) ; //we can't lose transactions. distributed cache can lose data is num_owner nodes crash at the same time builder . clustering ( ) . cacheMode ( globalComponentRegistry . getGlobalConfiguration ( ) . isClustered ( ) ? CacheMode . REPL_SYNC : CacheMode . LOCAL ) ; builder . transaction ( ) . transactionMode ( TransactionMode . NON_TRANSACTIONAL ) ; //persistent? should we keep the transaction after restart? registry . registerInternalCache ( GLOBAL_TX_TABLE_CACHE_NAME , builder . build ( ) , EnumSet . noneOf ( InternalCacheRegistry . Flag . class ) ) ; }
Creates the global transaction internal cache .