Package org.apache.excalibur.event.command

Examples of org.apache.excalibur.event.command.TPCThreadManager


            this.context = new DefaultContext(context);
           
            try
            {
                DefaultContext setup = (DefaultContext)this.context;
                threads = new TPCThreadManager();
                CommandManager commands = new CommandManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
View Full Code Here


        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                this.threads = new TPCThreadManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                this.threads = new TPCThreadManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
View Full Code Here

            this.context = new DefaultContext(context);
           
            try
            {
                DefaultContext setup = (DefaultContext)this.context;
                threads = new TPCThreadManager();
                CommandManager commands = new CommandManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                this.threads = new TPCThreadManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                threads = new TPCThreadManager();
                CommandManager commands = new CommandManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
View Full Code Here

     */
    public void testThreadContention() throws Exception
    {
        // enforces only 1 thread and no timeout which makes it
        // fail quickly
        final TPCThreadManager threadManager = new TPCThreadManager();

        threadManager.parameterize( createParameters( 1, 0 ) );
        threadManager.initialize();

        // an obviously syncronized component
        final StringBuffer result = new StringBuffer();
        final StringWriter exceptionBuffer = new StringWriter();
        final PrintWriter errorOut = new PrintWriter( exceptionBuffer );

        threadManager.register( new Pipeline( result, errorOut ) );

        // sleeps for 1 more scheduling timeout to surely go over limit
        Thread.sleep( SCHEDULING_TIMEOUT * ( MINIMAL_NUMBER_INVOCATIONS + 1 ) );

        int numberCalls = result.length();
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                threads = new TPCThreadManager();
                CommandManager commands = new CommandManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                this.threads = new TPCThreadManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
View Full Code Here

        if (this.context == null) {
            this.context = new ComponentContext(context);
           
            try {
                DefaultContext setup = (DefaultContext)this.context;
                this.threads = new TPCThreadManager();
               
                Parameters params = new Parameters();
                params.setParameter("threads-per-processor", "1");
                params.setParameter("sleep-time", "100");
                params.setParameter("block-timeout", "1000");
View Full Code Here

TOP

Related Classes of org.apache.excalibur.event.command.TPCThreadManager

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.