donaldp 02/05/13 05:28:36
Modified: instrument/src/java/org/apache/avalon/excalibur/instrument
AbstractInstrument.java AbstractInstrumentable.java
AbstractLogEnabledInstrumentable.java
CounterInstrument.java InstrumentProxy.java
Instrumentable.java ValueInstrument.java
pool/src/java/org/apache/avalon/excalibur/pool
ResourceLimitingPool.java
Log:
Remove some whitespace at end of lines.
Revision Changes Path
1.4 +8 -8
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractInstrument.java
Index: AbstractInstrument.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractInstrument.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractInstrument.java 3 Apr 2002 13:48:49 -0000 1.3
+++ AbstractInstrument.java 13 May 2002 12:28:35 -0000 1.4
@@ -12,7 +12,7 @@
* the Instruement interface.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/04/03 13:48:49 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:28:35 $
* @since 4.1
*/
public abstract class AbstractInstrument
@@ -20,10 +20,10 @@
{
/** The name of the Instrument. */
private String m_name;
-
+
/** Proxy object used to communicate with the InstrumentManager. */
private InstrumentProxy m_proxy;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -37,7 +37,7 @@
{
m_name = name;
}
-
+
/*---------------------------------------------------------------
* Instrument Methods
*-------------------------------------------------------------*/
@@ -53,7 +53,7 @@
{
return m_name;
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -70,14 +70,14 @@
*/
public void setInstrumentProxy( InstrumentProxy proxy )
{
- if ( m_proxy != null )
+ if( m_proxy != null )
{
throw new IllegalStateException(
"Once an InstrumentProxy has been set, it can not be
changed." );
}
m_proxy = proxy;
}
-
+
/**
* Used by classes being profiled so that they can avoid unnecessary
* code when the data from an Instrument is not being used.
@@ -88,7 +88,7 @@
{
return ( m_proxy != null ) && ( m_proxy.isActive() );
}
-
+
/**
* Returns the InstrumentProxy object assigned to the instrument by the
* InstrumentManager.
1.4 +20 -20
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractInstrumentable.java
Index: AbstractInstrumentable.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractInstrumentable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractInstrumentable.java 22 Apr 2002 06:39:22 -0000 1.3
+++ AbstractInstrumentable.java 13 May 2002 12:28:35 -0000 1.4
@@ -23,17 +23,17 @@
implements Instrumentable
{
/** Name of the instrumentable. */
- private String m_instrumentableName;
-
+ private String m_instrumentableName;
+
/** Stores the instruments during initialization. */
private ArrayList m_instrumentList;
-
+
/** Stores the child instrumentables during initialization. */
private ArrayList m_childList;
-
+
/** Flag which is to used to keep track of when the Instrumentable has
been registered. */
private boolean m_registered;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -46,7 +46,7 @@
m_instrumentList = new ArrayList();
m_childList = new ArrayList();
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -59,14 +59,14 @@
*/
protected void addInstrument( Instrument instrument )
{
- if ( m_registered )
+ if( m_registered )
{
throw new IllegalStateException( "Instruments can not be added
after the " +
- "Instrumentable is registered with the InstrumentManager." );
+ "Instrumentable is registered
with the InstrumentManager." );
}
m_instrumentList.add( instrument );
}
-
+
/**
* Adds a child Instrumentable to the list of child Instrumentables
* published by the component. This method may not be called after the
@@ -79,14 +79,14 @@
*/
protected void addChildInstrumentable( Instrumentable child )
{
- if ( m_registered )
+ if( m_registered )
{
throw new IllegalStateException( "Child Instrumentables can not
be added after the " +
- "Instrumentable is registered with the InstrumentManager." );
+ "Instrumentable is registered
with the InstrumentManager." );
}
m_childList.add( child );
}
-
+
/*---------------------------------------------------------------
* Instrumentable Methods
*-------------------------------------------------------------*/
@@ -95,7 +95,7 @@
*
* @return The name used to identify a Instrumentable.
*/
- public final String getInstrumentableName()
+ public final String getInstrumentableName()
{
return m_instrumentableName;
}
@@ -113,11 +113,11 @@
*
* @param name The name used to identify a Instrumentable.
*/
- public final void setInstrumentableName(String name)
+ public final void setInstrumentableName( String name )
{
m_instrumentableName = name;
}
-
+
/**
* Any Object which implements Instrumentable can also make use of other
* Instrumentable child objects. This method is used to tell the
@@ -127,10 +127,10 @@
* return null. If there are no child Instrumentables, then
* EMPTY_INSTRUMENTABLE_ARRAY can be returned.
*/
- public final Instrumentable[] getChildInstrumentables()
+ public final Instrumentable[] getChildInstrumentables()
{
m_registered = true;
- if ( m_childList.size() == 0 )
+ if( m_childList.size() == 0 )
{
return Instrumentable.EMPTY_INSTRUMENTABLE_ARRAY;
}
@@ -141,7 +141,7 @@
return children;
}
}
-
+
/**
* Obtain a reference to all the Instruments that the Instrumentable
object
* wishes to expose. All sampling is done directly through the
@@ -153,10 +153,10 @@
* the case though unless there are child Instrumentables with
* Instruments.
*/
- public final Instrument[] getInstruments()
+ public final Instrument[] getInstruments()
{
m_registered = true;
- if ( m_instrumentList.size() == 0 )
+ if( m_instrumentList.size() == 0 )
{
return Instrumentable.EMPTY_INSTRUMENT_ARRAY;
}
1.3 +20 -20
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractLogEnabledInstrumentable.java
Index: AbstractLogEnabledInstrumentable.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/AbstractLogEnabledInstrumentable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractLogEnabledInstrumentable.java 22 Apr 2002 06:39:22 -0000
1.2
+++ AbstractLogEnabledInstrumentable.java 13 May 2002 12:28:36 -0000
1.3
@@ -26,17 +26,17 @@
implements Instrumentable
{
/** Name of the instrumentable. */
- private String m_instrumentableName;
-
+ private String m_instrumentableName;
+
/** Stores the instruments during initialization. */
private ArrayList m_instrumentList;
-
+
/** Stores the child instrumentables during initialization. */
private ArrayList m_childList;
-
+
/** Flag which is to used to keep track of when the Instrumentable has
been registered. */
private boolean m_registered;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -49,7 +49,7 @@
m_instrumentList = new ArrayList();
m_childList = new ArrayList();
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -62,14 +62,14 @@
*/
protected void addInstrument( Instrument instrument )
{
- if ( m_registered )
+ if( m_registered )
{
throw new IllegalStateException( "Instruments can not be added
after the " +
- "Instrumentable is registered with the InstrumentManager." );
+ "Instrumentable is registered
with the InstrumentManager." );
}
m_instrumentList.add( instrument );
}
-
+
/**
* Adds a child Instrumentable to the list of child Instrumentables
* published by the component. This method may not be called after the
@@ -82,14 +82,14 @@
*/
protected void addChildInstrumentable( Instrumentable child )
{
- if ( m_registered )
+ if( m_registered )
{
throw new IllegalStateException( "Child Instrumentables can not
be added after the " +
- "Instrumentable is registered with the InstrumentManager." );
+ "Instrumentable is registered
with the InstrumentManager." );
}
m_childList.add( child );
}
-
+
/*---------------------------------------------------------------
* Instrumentable Methods
*-------------------------------------------------------------*/
@@ -98,7 +98,7 @@
*
* @return The name used to identify a Instrumentable.
*/
- public final String getInstrumentableName()
+ public final String getInstrumentableName()
{
return m_instrumentableName;
}
@@ -116,11 +116,11 @@
*
* @param name The name used to identify a Instrumentable.
*/
- public final void setInstrumentableName(String name)
+ public final void setInstrumentableName( String name )
{
m_instrumentableName = name;
}
-
+
/**
* Any Object which implements Instrumentable can also make use of other
* Instrumentable child objects. This method is used to tell the
@@ -130,10 +130,10 @@
* return null. If there are no child Instrumentables, then
* EMPTY_INSTRUMENTABLE_ARRAY can be returned.
*/
- public final Instrumentable[] getChildInstrumentables()
+ public final Instrumentable[] getChildInstrumentables()
{
m_registered = true;
- if ( m_childList.size() == 0 )
+ if( m_childList.size() == 0 )
{
return Instrumentable.EMPTY_INSTRUMENTABLE_ARRAY;
}
@@ -144,7 +144,7 @@
return children;
}
}
-
+
/**
* Obtain a reference to all the Instruments that the Instrumentable
object
* wishes to expose. All sampling is done directly through the
@@ -156,10 +156,10 @@
* the case though unless there are child Instrumentables with
* Instruments.
*/
- public final Instrument[] getInstruments()
+ public final Instrument[] getInstruments()
{
m_registered = true;
- if ( m_instrumentList.size() == 0 )
+ if( m_instrumentList.size() == 0 )
{
return Instrumentable.EMPTY_INSTRUMENT_ARRAY;
}
1.5 +5 -5
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/CounterInstrument.java
Index: CounterInstrument.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/CounterInstrument.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CounterInstrument.java 22 Apr 2002 09:52:42 -0000 1.4
+++ CounterInstrument.java 13 May 2002 12:28:36 -0000 1.5
@@ -14,7 +14,7 @@
* times that a method is accessed.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/04/22 09:52:42 $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/05/13 12:28:36 $
* @since 4.1
*/
public class CounterInstrument
@@ -33,7 +33,7 @@
{
super( name );
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -45,12 +45,12 @@
public void increment()
{
InstrumentProxy proxy = getInstrumentProxy();
- if ( proxy != null )
+ if( proxy != null )
{
proxy.increment( 1 );
}
}
-
+
/**
* Increments the Instrument by a specified count. This method is
* optimized to be extremely light weight when an InstrumentManager is
not
@@ -61,7 +61,7 @@
public void increment( int count )
{
InstrumentProxy proxy = getInstrumentProxy();
- if ( proxy != null )
+ if( proxy != null )
{
proxy.increment( count );
}
1.5 +3 -3
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/InstrumentProxy.java
Index: InstrumentProxy.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/InstrumentProxy.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InstrumentProxy.java 22 Apr 2002 09:52:42 -0000 1.4
+++ InstrumentProxy.java 13 May 2002 12:28:36 -0000 1.5
@@ -18,7 +18,7 @@
* as an instrument used by the instrument manager.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/04/22 09:52:42 $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/05/13 12:28:36 $
* @since 4.1
*/
public interface InstrumentProxy
@@ -30,7 +30,7 @@
* @return True if listeners are registered with the Instrument.
*/
boolean isActive();
-
+
/**
* Increments the Instrument by a specified count. This method should be
* optimized to be extremely light weight when there are no registered
@@ -42,7 +42,7 @@
* @param count A positive integer to increment the counter by.
*/
void increment( int count );
-
+
/**
* Sets the current value of the Instrument. This method is optimized
* to be extremely light weight when there are no registered
1.3 +6 -6
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/Instrumentable.java
Index: Instrumentable.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/Instrumentable.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Instrumentable.java 3 Apr 2002 13:48:49 -0000 1.2
+++ Instrumentable.java 13 May 2002 12:28:36 -0000 1.3
@@ -17,7 +17,7 @@
* so as not to reduce performance when they are not being used.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/04/03 13:48:49 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:28:36 $
* @since 4.1
*/
public interface Instrumentable
@@ -25,14 +25,14 @@
/**
* Empty Instrument array for use in hierarchical Instrumentable systems.
*/
- Instrument[] EMPTY_INSTRUMENT_ARRAY = new Instrument[] {};
-
+ Instrument[] EMPTY_INSTRUMENT_ARRAY = new Instrument[]{};
+
/**
* Empty Instrumentable array for use in hierarchical Instrumentable
* systems.
*/
- Instrumentable[] EMPTY_INSTRUMENTABLE_ARRAY = new Instrumentable[] {};
-
+ Instrumentable[] EMPTY_INSTRUMENTABLE_ARRAY = new Instrumentable[]{};
+
/**
* Sets the name for the Instrumentable. The Instrumentable Name is used
* to uniquely identify the Instrumentable during the configuration of
@@ -47,7 +47,7 @@
* @param name The name used to identify a Instrumentable.
*/
void setInstrumentableName( String name );
-
+
/**
* Gets the name of the Instrumentable.
*
1.4 +3 -3
jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/ValueInstrument.java
Index: ValueInstrument.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/instrument/src/java/org/apache/avalon/excalibur/instrument/ValueInstrument.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ValueInstrument.java 3 Apr 2002 13:48:49 -0000 1.3
+++ ValueInstrument.java 13 May 2002 12:28:36 -0000 1.4
@@ -13,7 +13,7 @@
* profiling things like system memory, or the size of a pool or cache.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/04/03 13:48:49 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:28:36 $
* @since 4.1
*/
public class ValueInstrument
@@ -32,7 +32,7 @@
{
super( name );
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -46,7 +46,7 @@
public void setValue( int value )
{
InstrumentProxy proxy = getInstrumentProxy();
- if ( proxy != null )
+ if( proxy != null )
{
proxy.setValue( value );
}
1.3 +25 -27
jakarta-avalon-excalibur/pool/src/java/org/apache/avalon/excalibur/pool/ResourceLimitingPool.java
Index: ResourceLimitingPool.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/pool/src/java/org/apache/avalon/excalibur/pool/ResourceLimitingPool.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ResourceLimitingPool.java 10 Apr 2002 05:34:20 -0000 1.2
+++ ResourceLimitingPool.java 13 May 2002 12:28:36 -0000 1.3
@@ -9,12 +9,10 @@
import java.util.Iterator;
import java.util.LinkedList;
-
import org.apache.avalon.excalibur.instrument.CounterInstrument;
import org.apache.avalon.excalibur.instrument.Instrument;
import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.ValueInstrument;
-
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.LogEnabled;
@@ -32,7 +30,7 @@
* trimmed. See the [EMAIL PROTECTED] #trim()} method for details of how
trimming works.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Leif Mortenson</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/04/10 05:34:20 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:28:36 $
* @since 4.1
*/
public class ResourceLimitingPool
@@ -47,7 +45,7 @@
public static final String INSTRUMENT_BLOCKS_NAME = "blocks";
public static final String INSTRUMENT_CREATES_NAME = "creates";
public static final String INSTRUMENT_DECOMMISSIONS_NAME =
"decommissions";
-
+
/*---------------------------------------------------------------
* Protected Fields
*-------------------------------------------------------------*/
@@ -128,28 +126,28 @@
/** Instrumentable Name assigned to this Instrumentable */
private String m_instrumentableName = DEFAULT_INSTRUMENTABLE_NAME;
-
+
/** Instrument used to profile the size of the pool. */
private ValueInstrument m_sizeInstrument;
-
+
/** Instrument used to profile the number of available poolables. */
private ValueInstrument m_readySizeInstrument;
-
+
/** Instrument used to profile the number of gets. */
private CounterInstrument m_getsInstrument;
-
+
/** Instrument used to profile the number of puts. */
private CounterInstrument m_putsInstrument;
-
+
/** Instrument used to profile the number of blocks. */
private CounterInstrument m_blocksInstrument;
-
+
/** Instrument used to profile the number of created poolables. */
private CounterInstrument m_createsInstrument;
-
+
/** Instrument used to profile the number of decommissioned poolables. */
private CounterInstrument m_decommissionsInstrument;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -189,7 +187,7 @@
{
m_oldReady = new LinkedList();
}
-
+
// Initialize the Instrumentable elements.
m_sizeInstrument = new ValueInstrument( INSTRUMENT_SIZE_NAME );
m_readySizeInstrument = new ValueInstrument(
INSTRUMENT_READY_SIZE_NAME );
@@ -261,7 +259,7 @@
// Notify the InstrumentManager
m_blocksInstrument.increment();
-
+
if( m_blockTimeout > 0 )
{
// Wait for a limited amount of time for a
poolable is made
@@ -373,14 +371,14 @@
{
getLogger().debug( "Got a " + poolable.getClass().getName() + "
from the pool." );
}
-
+
// Notify the InstrumentManager
m_getsInstrument.increment();
- if ( m_readySizeInstrument.isActive() )
+ if( m_readySizeInstrument.isActive() )
{
m_readySizeInstrument.setValue( getReadySize() );
}
-
+
return poolable;
}
@@ -443,10 +441,10 @@
permanentlyRemovePoolable( poolable );
}
}
-
+
// Notify the InstrumentManager
m_putsInstrument.increment();
- if ( m_readySizeInstrument.isActive() )
+ if( m_readySizeInstrument.isActive() )
{
m_readySizeInstrument.setValue( getReadySize() );
}
@@ -500,13 +498,13 @@
getLogger().debug( "There were " + m_size
+ " outstanding objects when the pool was
disposed." );
}
-
+
// Notify the InstrumentManager
- if ( m_sizeInstrument.isActive() )
+ if( m_sizeInstrument.isActive() )
{
m_sizeInstrument.setValue( getSize() );
}
- if ( m_readySizeInstrument.isActive() )
+ if( m_readySizeInstrument.isActive() )
{
m_readySizeInstrument.setValue( getReadySize() );
}
@@ -629,14 +627,14 @@
protected Poolable newPoolable() throws Exception
{
Object obj = m_factory.newInstance();
-
+
// Notify the InstrumentManager
m_createsInstrument.increment();
- if ( m_sizeInstrument.isActive() )
+ if( m_sizeInstrument.isActive() )
{
m_sizeInstrument.setValue( getSize() );
}
-
+
return (Poolable)obj;
}
@@ -654,10 +652,10 @@
try
{
m_factory.decommission( poolable );
-
+
// Notify the InstrumentManager
m_decommissionsInstrument.increment();
- if ( m_sizeInstrument.isActive() )
+ if( m_sizeInstrument.isActive() )
{
m_sizeInstrument.setValue( getSize() );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>