Esempio n. 1
0
 public MultiMapConfig(MultiMapConfig defConfig) {
   this.name = defConfig.getName();
   this.valueCollectionType = defConfig.valueCollectionType;
   this.binary = defConfig.binary;
   this.syncBackupCount = defConfig.syncBackupCount;
   this.asyncBackupCount = defConfig.asyncBackupCount;
   this.statisticsEnabled = defConfig.statisticsEnabled;
   this.listenerConfigs = new ArrayList<EntryListenerConfig>(defConfig.getEntryListenerConfigs());
 }
 @Test
 public void testMultimapConfig() {
   MultiMapConfig testMultiMapConfig = config.getMultiMapConfig("testMultimap");
   assertEquals(
       MultiMapConfig.ValueCollectionType.LIST, testMultiMapConfig.getValueCollectionType());
   assertEquals(2, testMultiMapConfig.getEntryListenerConfigs().size());
   for (EntryListenerConfig listener : testMultiMapConfig.getEntryListenerConfigs()) {
     if (listener.getClassName() != null) {
       assertNull(listener.getImplementation());
       assertTrue(listener.isIncludeValue());
       assertFalse(listener.isLocal());
     } else {
       assertNotNull(listener.getImplementation());
       assertEquals(entryListener, listener.getImplementation());
       assertTrue(listener.isLocal());
       assertTrue(listener.isIncludeValue());
     }
   }
 }