Package org.infinispan.commons.equivalence

Examples of org.infinispan.commons.equivalence.EquivalentHashMap$MapEntry


   public void writeObject(ObjectOutput output, Map map) throws IOException {
      int number = numbers.get(map.getClass(), -1);
      output.write(number);
      switch (number) {
         case EQUIVALENTHASHMAP:
            EquivalentHashMap equivalentMap = (EquivalentHashMap) map;
            output.writeObject(equivalentMap.getKeyEquivalence());
            output.writeObject(equivalentMap.getValueEquivalence());
            break;
         case FASTCOPYHASHMAP:
            //copy the map to avoid ConcurrentModificationException
            MarshallUtil.marshallMap(((FastCopyHashMap<?, ?>) map).clone(), output);
            return;
View Full Code Here


            subject = new FastCopyHashMap();
            break;
         case EQUIVALENTHASHMAP:
            Equivalence<Object> keyEq = (Equivalence<Object>) input.readObject();
            Equivalence<Object> valueEq = (Equivalence<Object>) input.readObject();
            subject = new EquivalentHashMap(keyEq, valueEq);
            break;
      }
      MarshallUtil.unmarshallMap(subject, input);
      return subject;
   }
View Full Code Here

   public void writeObject(ObjectOutput output, Map map) throws IOException {
      int number = numbers.get(map.getClass(), -1);
      output.write(number);
      switch (number) {
         case EQUIVALENTHASHMAP:
            EquivalentHashMap equivalentMap = (EquivalentHashMap) map;
            output.writeObject(equivalentMap.getKeyEquivalence());
            output.writeObject(equivalentMap.getValueEquivalence());
         default:
            break;
      }
      MarshallUtil.marshallMap(map, output);
   }
View Full Code Here

            subject = new FastCopyHashMap();
            break;
         case EQUIVALENTHASHMAP:
            Equivalence<Object> keyEq = (Equivalence<Object>) input.readObject();
            Equivalence<Object> valueEq = (Equivalence<Object>) input.readObject();
            subject = new EquivalentHashMap(keyEq, valueEq);
            break;
      }
      MarshallUtil.unmarshallMap(subject, input);
      return subject;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.commons.equivalence.EquivalentHashMap$MapEntry

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.