Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * IronJacamar, a Java EE Connector Architecture implementation
   * Copyright 2012, Red Hat Inc, and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site:
 package org.jboss.jca.core.workmanager;
Work event listener

Jesper Pedersen
 public class WorkEventListener extends WorkAdapter
Short or long running work
    private boolean isLong;

The short thread pool
    private StatisticsExecutor shortThreadPool;

The long thread pool
    private StatisticsExecutor longThreadPool;

The address
    private Address address;

The transport
    private Transport transport;


isLong Is long running work instance
shortThreadPool The short running thread pool
longThreadPool The long running thread pool
address The address
transport The transport
    public WorkEventListener(boolean isLong,
                             StatisticsExecutor shortThreadPool,
                             StatisticsExecutor longThreadPool,
                             Address address,
                             Transport transport)
       this. = isLong;
       this. = shortThreadPool;
       this. = longThreadPool;
       this. = address;
       this. = transport;

    public void workCompleted(WorkEvent e)

    public void workRejected(WorkEvent e)

Send the done signal to other nodes We are adding 1 to the result, since the thread officially has been released yet, but will be shortly
    private void done()
       if ( != null && )
                                         .getNumberOfFreeThreads() + 1);
                                          .getNumberOfFreeThreads() + 1);
New to GrepCode? Check out our FAQ X