public V put(K key, V value, boolean notify) { MapEntry<K,V> entry = new MapEntry<>(key, value); entry.setBackup(false); entry.setProxy(false); entry.setPrimary(channel.getLocalMember(false)); V old = null; //make sure that any old values get removed if ( containsKey(key) ) old = remove(key); try { if ( notify ) { Member[] backup = publishEntryInfo(key, value); entry.setBackupNodes(backup); } } catch (ChannelException x) { log.error("Unable to replicate out data for a LazyReplicatedMap.put operation", x); } innerMap.put(key,entry); return old; }
public Object put(Object key, Object value, boolean notify) { MapEntry entry = new MapEntry(key,value); entry.setBackup(false); entry.setProxy(false); entry.setPrimary(channel.getLocalMember(false)); Object old = null; //make sure that any old values get removed if ( containsKey(key) ) old = remove(key); try { if ( notify ) { Member[] backup = publishEntryInfo(key, value); entry.setBackupNodes(backup); } } catch (ChannelException x) { log.error("Unable to replicate out data for a LazyReplicatedMap.put operation", x); } super.put(key,entry); return old; }
public Object put(Object key, Object value, boolean notify) { MapEntry entry = new MapEntry(key,value); entry.setBackup(false); entry.setProxy(false); entry.setPrimary(channel.getLocalMember(false)); Object old = null; //make sure that any old values get removed if ( containsKey(key) ) old = remove(key); try { if ( notify ) { Member[] backup = publishEntryInfo(key, value); entry.setBackupNodes(backup); } } catch (ChannelException x) { log.error("Unable to replicate out data for a LazyReplicatedMap.put operation", x); } super.put(key,entry); return old; }
public V put(K key, V value, boolean notify) { MapEntry<K,V> entry = new MapEntry<>(key, value); entry.setBackup(false); entry.setProxy(false); entry.setCopy(false); entry.setPrimary(channel.getLocalMember(false)); V old = null; //make sure that any old values get removed if ( containsKey(key) ) old = remove(key); try { if ( notify ) { Member[] backup = publishEntryInfo(key, value); entry.setBackupNodes(backup); } } catch (ChannelException x) { log.error(sm.getString("abstractReplicatedMap.unable.put"), x); } innerMap.put(key,entry); return old; }