Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 53   Methods: 3
NCLOC: 29   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
TestListener.java 100% 80% 66.7% 80%
coverage coverage
 1    /*
 2    * Created on 23-Feb-2005
 3    *
 4    *
 5    *
 6    */
 7    package org.jboss.cache.optimistic;
 8   
 9    import org.apache.commons.logging.Log;
 10    import org.apache.commons.logging.LogFactory;
 11    import org.jboss.cache.notifications.annotation.CacheListener;
 12    import org.jboss.cache.notifications.annotation.NodeCreated;
 13    import org.jboss.cache.notifications.event.NodeEvent;
 14   
 15    /**
 16    * @author swoodcock
 17    */
 18    @CacheListener
 19    public class TestListener
 20    {
 21   
 22    Log log = LogFactory.getLog(getClass());
 23    private int nodesAdded = 0;
 24   
 25    /* (non-Javadoc)
 26    * @see org.jboss.cache.TreeCacheListener#nodeCreated(org.jboss.cache.Fqn)
 27    */
 28  618 @NodeCreated
 29    public synchronized void nodeCreated(NodeEvent e)
 30    {
 31  618 if (e.isPre())
 32    {
 33  309 nodesAdded++;
 34  309 log.info("DataNode created " + e.getFqn());
 35    }
 36    }
 37   
 38    /**
 39    * @return Returns the nodesAdded.
 40    */
 41  5 public int getNodesAdded()
 42    {
 43  5 return nodesAdded;
 44    }
 45   
 46    /**
 47    * @param nodesAdded The nodesAdded to set.
 48    */
 49  0 public void setNodesAdded(int nodesAdded)
 50    {
 51  0 this.nodesAdded = nodesAdded;
 52    }
 53    }