gedi-geode-extensions-core/src/main/java/gedi/solutions/geode/client/GeodeClient.java
@SuppressWarnings({ "unchecked", "rawtypes" })
	public <K,V> void  registerAfterPut(String regionName, Consumer<EntryEvent<K, V>> consumer)
	{
		CacheListenerBridge<K, V> listener = (CacheListenerBridge)this.listenerMap.get(regionName);
		if(listener == null)
		{
			Region<K,V> region = (Region<K,V>)clientCache.getRegion(regionName);
			
			if(region != null )
				throw new IllegalStateException("Cannot register a listener when the region already created. Try registering the listener first. Then use GeodeClient.getRegion for regionName:"+regionName);
			
			listener = CacheListenerBridge.forAfterPut(consumer);
		}
		else
		{
			listener.addAfterPutListener(consumer);
		}
		
		this.listenerMap.put(regionName, listener);
		
	}
@SuppressWarnings({ "unchecked", "rawtypes" })
	public <K,V> void  registerAfterPut(String regionName, Consumer<EntryEvent<K, V>> consumer)
	{
		CacheListenerBridge<K, V> listener = (CacheListenerBridge)this.listenerMap.get(regionName);
		if(listener == null)
		{
			Region<K,V> region = (Region<K,V>)clientCache.getRegion(regionName);
			
			if(region != null )
				throw new IllegalStateException("Cannot register a listener when the region already created. Try registering the listener first. Then use GeodeClient.getRegion for regionName:"+regionName);
			
			listener = CacheListenerBridge.forAfterPut(consumer);
		}
		else
		{
			listener.addAfterPutListener(consumer);
		}
		
		this.listenerMap.put(regionName, listener);
		
	}
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public < K , V > void registerAfterPut ( String regionName , Consumer < EntryEvent < K , V > > consumer ) { CacheListenerBridge < K , V > listener = ( CacheListenerBridge ) this . listenerMap . get ( regionName ) ; if ( listener == null ) { Region < K , V > region = ( Region < K , V > ) clientCache . getRegion ( regionName ) ; if ( region != null ) throw new IllegalStateException ( "Cannot register a listener when the region already created. Try registering the listener first. Then use GeodeClient.getRegion for regionName:" + regionName ) ; listener = CacheListenerBridge . forAfterPut ( consumer ) ; } else { listener . addAfterPutListener ( consumer ) ; } this . listenerMap . put ( regionName , listener ) ; }
Add the observer as a listener for put/create events
@param <K> the region key
@param <V> the region value
@param regionName the region name
@param consumer the observer
Add the observer as a listener for put / create events