Package com.tangosol.util

Examples of com.tangosol.util.MapListener


            }
        }
    }

    private void simuateCacheInserts(Cache<Object, Object> cache) {
        MapListener mapListener = mapListeners.get(cache);
        if (mapListener != null) {
            if (cache instanceof CacheWrapper) {
                Cache wrapped = ((CacheWrapper) cache).getWrappedCache();
                if (wrapped instanceof ClusteredCache) {
                    ClusteredCache clusteredCache = (ClusteredCache) wrapped;
                    for (Map.Entry entry : cache.entrySet()) {
                        MapEvent event = new MapEvent(clusteredCache.map, MapEvent.ENTRY_INSERTED, entry.getKey(), null,
                                entry.getValue());
                        mapListener.entryInserted(event);
                    }
                }
            }
        }
    }
View Full Code Here


      final int batchSize = 20;
      int threadCount = 4;
     
      final Object value = new String[]{"ABC", "EFG", "123", "890", "QWERTY"};
     
      p1.addMapListener(new MapListener() {
       
        @Override
        public void entryUpdated(MapEvent evt) {
        }
     
        @Override
        public void entryInserted(MapEvent evt) {
          p4.put(evt.getKey(), evt.getNewValue());
        }
     
        @Override
        public void entryDeleted(MapEvent evt) {
        }
      });

      p2.addMapListener(new MapListener() {
       
        @Override
        public void entryUpdated(MapEvent evt) {
        }
       
        @Override
        public void entryInserted(MapEvent evt) {
          p3.put(evt.getKey(), evt.getNewValue());
        }
       
        @Override
        public void entryDeleted(MapEvent evt) {
        }
      });

      p3.addMapListener(new MapListener() {
       
        @Override
        public void entryUpdated(MapEvent evt) {
        }
       
View Full Code Here

      System.setProperty("event-benchmark-thread-count", "4");

      final NamedCache out = CacheFactory.getCache("out-pool");
      final NamedCache in = CacheFactory.getCache("in-pool");
      in.addMapListener(new MapListener() {
     
        @Override
        public void entryUpdated(MapEvent evt) {
          // ignore
        }
View Full Code Here

      out.clear();
      in.clear();
     
      final AtomicInteger counter = new AtomicInteger();
     
      out = new ContinuousQueryCache(in, new AlwaysFilter(), new MapListener() {
     
        @Override
        public void entryUpdated(MapEvent evt) {
          // TODO Auto-generated method stub
     
View Full Code Here

      System.setProperty("event-benchmark-thread-count", "4");

      final NamedCache out = CacheFactory.getCache("out-pool");
      final NamedCache in = CacheFactory.getCache("in-pool");
      in.addMapListener(new MapListener() {
     
        @Override
        public void entryUpdated(MapEvent evt) {
          // ignore
        }
View Full Code Here

      System.setProperty("tangosol.coherence.cacheconfig", "event-benchmark-cache-config.xml");
     
      final NamedCache out = CacheFactory.getCache("out-pool");
      final NamedCache in = CacheFactory.getCache("in-pool");
     
      out.addMapListener(new MapListener() {
     
        @Override
        public void entryUpdated(MapEvent evt) {
        }
     
View Full Code Here

    nestedCache.removeIndex(transformed);
  }

  @Override
  public void addMapListener(MapListener listener) {
    MapListener transformend = adapter.transformListener(this, listener);
    nestedCache.addMapListener(transformend);
  }
View Full Code Here

    nestedCache.addMapListener(transformend);
  }

  @Override
  public void addMapListener(MapListener listener, Object key, boolean lite) {
    MapListener transformend = adapter.transformListener(this, listener);
    nestedCache.addMapListener(transformend, key, true);
  }
View Full Code Here

    nestedCache.addMapListener(transformend, key, true);
  }

  @Override
  public void addMapListener(MapListener listener, Filter filter, boolean lite) {
    MapListener transformend = adapter.transformListener(this, listener);
    Filter transformedFilter = adapter.transformListenerFilter(this, filter);
    nestedCache.addMapListener(transformend, transformedFilter, true);
  }
View Full Code Here

    nestedCache.addMapListener(transformend, transformedFilter, true);
  }

  @Override
  public void removeMapListener(MapListener listener) {
    MapListener transformend = adapter.transformListener(this, listener);
    nestedCache.removeMapListener(transformend);
  }
View Full Code Here

TOP

Related Classes of com.tangosol.util.MapListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.