Package org.jboss.cache.util

Examples of org.jboss.cache.util.MapCopy


   private static Map copy(Map data, boolean useMarshalledValueMaps)
   {
      if (data == null) return null;
      if (data.isEmpty()) return Collections.emptyMap();
      if (safe(data)) return useMarshalledValueMaps ? new MarshalledValueMap(data) : data;
      Map defensivelyCopiedData = new MapCopy(data);
      return useMarshalledValueMaps ? new MarshalledValueMap(defensivelyCopiedData) : defensivelyCopiedData;
   }
View Full Code Here


   private static Map copy(Map data)
   {
      if (data == null) return null;
      if (data.isEmpty()) return Collections.emptyMap();
      if (safe(data)) return new MarshalledValueMap(data);
      return new MarshalledValueMap(new MapCopy(data));
   }
View Full Code Here

   public void put(Fqn name, Map attributes) throws Exception
   {
      if (config.getUseAsyncPut())
      {
         // JBCACHE-769 -- make a defensive copy
         Map attrs = (attributes == null ? null : new MapCopy(attributes));
         Modification mod = new Modification(Modification.ModificationType.PUT_DATA, name, attrs);
         enqueue(mod);
      }
      else
      {
View Full Code Here

   private Map unmarshallMapCopy(ObjectInputStream in, UnmarshalledReferences refMap) throws Exception
   {
      // read in as a HashMap first
      Map m = unmarshallHashMap(in, refMap);
      return new MapCopy(m);
   }
View Full Code Here

    */
   public Object perform(InvocationContext ctx)
   {
      NodeSPI n = dataContainer.peek(fqn);
      if (n == null) return null;
      return new MapCopy(n.getDataDirect());
   }
View Full Code Here

   private Map unmarshallMapCopy(ObjectInputStream in, UnmarshalledReferences refMap) throws Exception
   {
      // read in as a HashMap first
      Map m = unmarshallHashMap(in, refMap);
      return new MapCopy(m);
   }
View Full Code Here

   public void put(Fqn name, Map attributes) throws Exception
   {
      if (config.getUseAsyncPut())
      {
         // JBCACHE-769 -- make a defensive copy
         Map attrs = (attributes == null ? null : new MapCopy(attributes));
         Modification mod = new Modification(Modification.ModificationType.PUT_DATA, name, attrs);
         enqueue(mod);
      }
      else
      {
View Full Code Here

TOP

Related Classes of org.jboss.cache.util.MapCopy

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.