Package org.apache.excalibur.instrument

Examples of org.apache.excalibur.instrument.ValueInstrument


        {
            m_oldReady = new LinkedList();
        }

        // Initialize the Instrumentable elements.
        m_sizeInstrument = new ValueInstrument( INSTRUMENT_SIZE_NAME );
        m_readySizeInstrument = new ValueInstrument( INSTRUMENT_READY_SIZE_NAME );
        m_getsInstrument = new CounterInstrument( INSTRUMENT_GETS_NAME );
        m_putsInstrument = new CounterInstrument( INSTRUMENT_PUTS_NAME );
        m_blocksInstrument = new CounterInstrument( INSTRUMENT_BLOCKS_NAME );
        m_createsInstrument = new CounterInstrument( INSTRUMENT_CREATES_NAME );
        m_decommissionsInstrument = new CounterInstrument( INSTRUMENT_DECOMMISSIONS_NAME );
View Full Code Here


     * Creates a new DefaultInstrumentManager.
     */
    public DefaultInstrumentManager()
    {
        // Initialize the Instrumentable elements.
        m_totalMemoryInstrument = new ValueInstrument( INSTRUMENT_TOTAL_MEMORY );
        m_freeMemoryInstrument = new ValueInstrument( INSTRUMENT_FREE_MEMORY );
        m_memoryInstrument = new ValueInstrument( INSTRUMENT_MEMORY );
        m_activeThreadCountInstrument = new ValueInstrument( INSTRUMENT_ACTIVE_THREAD_COUNT );
    }
View Full Code Here

            // Maybe we are on IBM's SDK
            random = SecureRandom.getInstance("IBMSecureRandom");
        }
        random.setSeed(System.currentTimeMillis());

        continuationsCount = new ValueInstrument("count");
        continuationsCounter = 0;
        expirationsSize = new ValueInstrument("expirations-size");
        continuationsCreated = new CounterInstrument("creates");
        continuationsInvalidated = new CounterInstrument("invalidates");
    }
View Full Code Here

            random = SecureRandom.getInstance("IBMSecureRandom");
        }
        random.setSeed(System.currentTimeMillis());
        bytes = new byte[CONTINUATION_ID_LENGTH];

        continuationsCount = new ValueInstrument("count");
        continuationsCounter = 0;
        forestSize = new ValueInstrument("forest-size");
        expirationsSize = new ValueInstrument("expirations-size");
        continuationsCreated = new CounterInstrument("creates");
        continuationsInvalidated = new CounterInstrument("invalidates");
    }
View Full Code Here

            // Maybe we are on IBM's SDK
            random = SecureRandom.getInstance("IBMSecureRandom");
        }
        random.setSeed(System.currentTimeMillis());

        continuationsCount = new ValueInstrument("count");
        continuationsCounter = 0;
        expirationsSize = new ValueInstrument("expirations-size");
        continuationsCreated = new CounterInstrument("creates");
        continuationsInvalidated = new CounterInstrument("invalidates");
    }
View Full Code Here

        {
            m_oldReady = new LinkedList();
        }

        // Initialize the Instrumentable elements.
        m_sizeInstrument = new ValueInstrument( INSTRUMENT_SIZE_NAME );
        m_readySizeInstrument = new ValueInstrument( INSTRUMENT_READY_SIZE_NAME );
        m_getsInstrument = new CounterInstrument( INSTRUMENT_GETS_NAME );
        m_putsInstrument = new CounterInstrument( INSTRUMENT_PUTS_NAME );
        m_blocksInstrument = new CounterInstrument( INSTRUMENT_BLOCKS_NAME );
        m_createsInstrument = new CounterInstrument( INSTRUMENT_CREATES_NAME );
        m_decommissionsInstrument = new CounterInstrument( INSTRUMENT_DECOMMISSIONS_NAME );
View Full Code Here

     * Constructors
     *-------------------------------------------------------------*/
    public DefaultExampleInstrumentable()
    {
        // Initialize the Instrumentable elements.
        m_randomQuickInstrument = new ValueInstrument( INSTRUMENT_RANDOM_QUICK_NAME );
        m_randomSlowInstrument = new ValueInstrument( INSTRUMENT_RANDOM_SLOW_NAME );
        m_randomRandomInstrument = new ValueInstrument( INSTRUMENT_RANDOM_RANDOM_NAME );
        m_counterQuickInstrument = new CounterInstrument( INSTRUMENT_COUNTER_QUICK_NAME );
        m_counterSlowInstrument = new CounterInstrument( INSTRUMENT_COUNTER_SLOW_NAME );
        m_counterRandomInstrument = new CounterInstrument( INSTRUMENT_COUNTER_RANDOM_NAME );
        m_doActionInstrument = new CounterInstrument( INSTRUMENT_DOACTION_NAME );
    }
View Full Code Here

    public void testNInstrument() throws Exception
    {
        Instrument[] instruments = new Instrument[]
            {
                new CounterInstrument( "c1" ),
                new ValueInstrument( "v1" ),
                new CounterInstrument( "c2" ),
                new ValueInstrument( "v2" ),
                new CounterInstrument( "c3" ),
                new ValueInstrument( "v3" ),
                new CounterInstrument( "c4" ),
                new ValueInstrument( "v4" )
            };
        Instrumentable[] children = new Instrumentable[] {};
       
        generalTest( instruments, children );
    }
View Full Code Here

    public void testNInstrument() throws Exception
    {
        Instrument[] instruments = new Instrument[]
            {
                new CounterInstrument( "c1" ),
                new ValueInstrument( "v1" ),
                new CounterInstrument( "c2" ),
                new ValueInstrument( "v2" ),
                new CounterInstrument( "c3" ),
                new ValueInstrument( "v3" ),
                new CounterInstrument( "c4" ),
                new ValueInstrument( "v4" )
            };
        Instrumentable[] children = new Instrumentable[] {};
       
        generalTest( instruments, children );
    }
View Full Code Here

    /*---------------------------------------------------------------
     * Test Cases
     *-------------------------------------------------------------*/
    public void testSimpleValueDisconnected() throws Exception
    {
        ValueInstrument vi = new ValueInstrument( "testInstrument" );
       
        assertEquals( "A disconnected instrument should not be active.", vi.isActive(), false );
       
        vi.setValue( 0 );
        vi.setValue( -1 );
        vi.setValue( 1 );
    }
View Full Code Here

TOP

Related Classes of org.apache.excalibur.instrument.ValueInstrument

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.