question: public static synchronized Cache createCache ( ) { if ( cache == null ) { Properties dsp = new Properties ( ) ; dsp . setProperty ( MCAST_PORT , "0" ) ; dsp . setProperty ( LOCATORS , "" ) ; DistributedSystem sys = DistributedSystem . connect ( dsp ) ; try { cache = CacheFactory . create ( sys ) ; } catch ( CacheExistsException exp ) { cache = CacheFactory . getInstance ( sys ) ; } catch ( RegionExistsException rex ) { cache = CacheFactory . getInstance ( sys ) ; } } return cache ; }
target:  This method creates cache. The cache created is a loner, so this is only suitable for single VM tests.