[jboss-cvs] JBossCache/src/org/jboss/cache/loader/jdbm ...

Manik Surtani msurtani at jboss.com
Sat Dec 30 14:48:47 EST 2006


  User: msurtani
  Date: 06/12/30 14:48:47

  Modified:    src/org/jboss/cache/loader/jdbm  JdbmCacheLoader.java
  Log:
  Genericised, autoboxed
  
  Revision  Changes    Path
  1.20      +8 -8      JBossCache/src/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JdbmCacheLoader.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/loader/jdbm/JdbmCacheLoader.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- JdbmCacheLoader.java	30 Dec 2006 17:50:06 -0000	1.19
  +++ JdbmCacheLoader.java	30 Dec 2006 19:48:47 -0000	1.20
  @@ -55,7 +55,7 @@
    * plans to fix this.
    *
    * @author Elias Ross
  - * @version $Id: JdbmCacheLoader.java,v 1.19 2006/12/30 17:50:06 msurtani Exp $
  + * @version $Id: JdbmCacheLoader.java,v 1.20 2006/12/30 19:48:47 msurtani Exp $
    */
   public class JdbmCacheLoader extends AbstractCacheLoader
   {
  @@ -69,7 +69,7 @@
      private String cacheDbName;
      private RecordManager recman;
      private BTree tree;
  -   private Map transactions = new ConcurrentHashMap();
  +   private Map<Object, List<Modification>> transactions = new ConcurrentHashMap<Object, List<Modification>>();
   
      /*
       * Service implementation -- lifecycle methods.
  @@ -258,7 +258,7 @@
       * browser applications.  Calling this method as part of a run-time
       * transaction is not recommended.
       */
  -   public Set getChildrenNames(Fqn name)
  +   public Set<String> getChildrenNames(Fqn name)
              throws Exception
      {
   
  @@ -273,7 +273,7 @@
         }
      }
   
  -   private Set getChildrenNames0(Fqn name) throws IOException
  +   private Set<String> getChildrenNames0(Fqn name) throws IOException
      {
         TupleBrowser browser = tree.browse(name);
         Tuple t = new Tuple();
  @@ -292,7 +292,7 @@
            return null;
         }
   
  -      Set set = new HashSet();
  +      Set<String> set = new HashSet<String>();
   
         // Want only /a/b/c/X nodes
         int depth = name.size() + 1;
  @@ -306,7 +306,7 @@
            }
            if (size == depth && t.getValue().equals(NODE))
            {
  -            set.add(fqn.getLast());
  +            set.add((String) fqn.getLast());
            }
         }
   
  @@ -594,7 +594,7 @@
      /**
       * Applies and commits the given modifications in one transaction.
       */
  -   public void prepare(Object tx, List modifications, boolean onePhase)
  +   public void prepare(Object tx, List<Modification> modifications, boolean onePhase)
              throws Exception
      {
         if (onePhase)
  @@ -612,7 +612,7 @@
       */
      public void commit(Object tx) throws Exception
      {
  -      List modifications = (List) transactions.remove(tx);
  +      List<Modification> modifications = transactions.remove(tx);
         if (modifications == null)
         {
            throw new IllegalStateException("transaction " + tx + " not found in transaction table");
  
  
  



More information about the jboss-cvs-commits mailing list