Package java.util

Examples of java.util.Hashtable.clone()


    if (layer == 0) return;
    //duplicate the previous layers
    Hashtable maxminus = (Hashtable) maxResources.get(layer-1);
    Hashtable minminus = (Hashtable) minResources.get(layer-1);
    Map newmax = (Hashtable) maxminus.clone();
    Map newmin = (Hashtable) minminus.clone();
    maxResources.add(layer, newmax);
    minResources.add(layer, newmin);

    //loop throught the current resource operators and if they increase/decrease update the values on the new layer
    Iterator roit = resOps.iterator();
View Full Code Here


            lstnrs= (Hashtable) listeners.get ( state );
            if ( lstnrs == null )
                  return;
            //clone to avoid concurrency effects outside synch block
            //during iteration hereafter
            lstnrs = ( Hashtable ) lstnrs.clone();
        }
       
        //notify OUTSIDE SYNCH to minimize deadlocks
        Enumeration enumm=lstnrs.keys();
        while (enumm.hasMoreElements()) {
View Full Code Here

                return;
           
            //clone to avoid concurrency effects
            //during iteration outside synch block
            lstnrs = ( Hashtable ) lstnrs.clone();
            tolstnrs = ( Hashtable ) tolstnrs.clone();
        }
       
        //iterator outside synch to avoid deadlocks
        Enumeration enumm =  tolstnrs.keys();
        while ( enumm.hasMoreElements() ) {
View Full Code Here

      mdcCopyLookupRequired = false;
      // the clone call is required for asynchronous logging.
      // See also bug #5932.
      Hashtable t = (Hashtable) MDC.getContext();
      if(t != null) {
  mdcCopy = (Hashtable) t.clone();
      }
    }
  }

  public
View Full Code Here

  public
  final
  Object childValue(Object parentValue) {
    Hashtable ht = (Hashtable) parentValue;
    if(ht != null) {
      return ht.clone();
    } else {
      return null;
    }
  }
}
View Full Code Here

      mdcCopyLookupRequired = false;
      // the clone call is required for asynchronous logging.
      // See also bug #5932.
      Hashtable t = (Hashtable) MDC.getContext();
      if(t != null) {
  mdcCopy = (Hashtable) t.clone();
      }
    }
  }

  public
View Full Code Here

/* 276 */     if (this.mdcCopyLookupRequired) {
/* 277 */       this.mdcCopyLookupRequired = false;
/*     */
/* 280 */       Hashtable t = MDC.getContext();
/* 281 */       if (t != null)
/* 282 */         this.mdcCopy = ((Hashtable)t.clone());
/*     */     }
/*     */   }
/*     */
/*     */   public String getRenderedMessage()
/*     */   {
View Full Code Here

/*    */ {
/*    */   public final Object childValue(Object parentValue)
/*    */   {
/* 34 */     Hashtable ht = (Hashtable)parentValue;
/* 35 */     if (ht != null) {
/* 36 */       return ht.clone();
/*    */     }
/* 38 */     return null;
/*    */   }
/*    */ }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.