org.jboss.jca.core.workmanager

## Class DistributedWorkManagerImpl

- java.lang.Object
- - org.jboss.jca.core.workmanager.WorkManagerImpl
  - - org.jboss.jca.core.workmanager.DistributedWorkManagerImpl

- All Implemented Interfaces:
    java.lang.Cloneable, javax.resource.spi.work.DistributableWorkManager, javax.resource.spi.work.WorkManager, org.jboss.jca.core.api.workmanager.DistributedWorkManager, org.jboss.jca.core.spi.graceful.GracefulShutdown

      public class DistributedWorkManagerImpl
      extends WorkManagerImpl
      implements org.jboss.jca.core.api.workmanager.DistributedWorkManager

  The distributed work manager implementation.
  Author:
    Jesper Pedersen

- - ### Field Summary

    - ### Fields inherited from interface javax.resource.spi.work.WorkManager

      `IMMEDIATE, INDEFINITE, UNKNOWN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistributedWorkManagerImpl()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.jboss.jca.core.api.workmanager.WorkManager` | `clone()` Clone the WorkManager implementation
    `protected void` | `deltaDoWorkAccepted()` Delta doWork accepted
    `protected void` | `deltaDoWorkRejected()` Delta doWork rejected
    `protected void` | `deltaScheduleWorkAccepted()` Delta scheduleWork accepted
    `protected void` | `deltaScheduleWorkRejected()` Delta scheduleWork rejected
    `protected void` | `deltaStartWorkAccepted()` Delta startWork accepted
    `protected void` | `deltaStartWorkRejected()` Delta startWork rejected
    `protected void` | `deltaWorkFailed()` Delta work failed
    `protected void` | `deltaWorkSuccessful()` Delta work successful
    `void` | `doWork(javax.resource.spi.work.Work work)`
    `org.jboss.jca.core.api.workmanager.DistributedWorkManagerStatistics` | `getDistributedStatistics()` Get the distributed statistics
    `java.util.Collection<org.jboss.jca.core.spi.workmanager.notification.NotificationListener>` | `getNotificationListeners()` Get the notification listeners attached
    `org.jboss.jca.core.spi.workmanager.policy.Policy` | `getPolicy()` Get the policy
    `org.jboss.jca.core.spi.workmanager.selector.Selector` | `getSelector()` Get the selector
    `org.jboss.jca.core.spi.workmanager.transport.Transport` | `getTransport()` Get the transport
    `void` | `initialize()` Initialize
    `boolean` | `isDistributedStatisticsEnabled()` Is distributed statistics enabled
    `boolean` | `isDoWorkDistributionEnabled()` Is distribution of Work instances for doWork enabled
    `boolean` | `isScheduleWorkDistributionEnabled()` Is distribution of Work instances for scheduleWork enabled
    `boolean` | `isStartWorkDistributionEnabled()` Is distribution of Work instances for startWork enabled
    `void` | `localDoWork(javax.resource.spi.work.Work work)` doWork locally
    `void` | `localScheduleWork(javax.resource.spi.work.Work work)` scheduleWork locally
    `long` | `localStartWork(javax.resource.spi.work.Work work)` startWork locally
    `void` | `scheduleWork(javax.resource.spi.work.Work work)`
    `void` | `setDistributedStatisticsEnabled(boolean v)` Set the distributed statistics enabled flag
    `void` | `setDoWorkDistributionEnabled(boolean v)` Toggle distribution of Work instances for doWork
    `void` | `setPolicy(org.jboss.jca.core.spi.workmanager.policy.Policy v)` Set the policy
    `void` | `setScheduleWorkDistributionEnabled(boolean v)` Toggle distribution of Work instances for scheduleWork
    `void` | `setSelector(org.jboss.jca.core.spi.workmanager.selector.Selector v)` Set the selector
    `void` | `setStartWorkDistributionEnabled(boolean v)` Toggle distribution of Work instances for startWork
    `void` | `setTransport(org.jboss.jca.core.spi.workmanager.transport.Transport v)` Set the transport
    `long` | `startWork(javax.resource.spi.work.Work work)`
    `void` | `toString(java.lang.StringBuilder sb)` Additional string representation

    - ### Methods inherited from class org.jboss.jca.core.workmanager.WorkManagerImpl

      `cancelShutdown, createWorkWrapper, doFirstChecks, doWork, getCallbackSecurity, getDelay, getId, getLongRunningThreadPool, getName, getResourceAdapter, getSecurityIntegration, getShortRunningThreadPool, getStatistics, getXATerminator, isShutdown, isSpecCompliant, isStatisticsEnabled, prepareShutdown, prepareShutdown, prepareShutdown, prepareShutdown, scheduleWork, setCallbackSecurity, setId, setLongRunningThreadPool, setName, setResourceAdapter, setSecurityIntegration, setShortRunningThreadPool, setSpecCompliant, setStatisticsEnabled, setXATerminator, shutdown, startWork, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.jboss.jca.core.api.workmanager.WorkManager

      `getCallbackSecurity, getId, getLongRunningThreadPool, getName, getSecurityIntegration, getShortRunningThreadPool, getStatistics, getXATerminator, isSpecCompliant, isStatisticsEnabled, setCallbackSecurity, setId, setLongRunningThreadPool, setName, setResourceAdapter, setSecurityIntegration, setShortRunningThreadPool, setSpecCompliant, setStatisticsEnabled, setXATerminator`

    - ### Methods inherited from interface javax.resource.spi.work.WorkManager

      `doWork, scheduleWork, startWork`

    - ### Methods inherited from interface org.jboss.jca.core.spi.graceful.GracefulShutdown

      `cancelShutdown, getDelay, isShutdown, prepareShutdown, prepareShutdown, prepareShutdown, prepareShutdown, shutdown`

- - ### Constructor Detail

    - #### DistributedWorkManagerImpl

          public DistributedWorkManagerImpl()

      Constructor

  - ### Method Detail

    - #### getPolicy

          public org.jboss.jca.core.spi.workmanager.policy.Policy getPolicy()

      Get the policy
      Specified by:
        `getPolicy` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        The value

    - #### setPolicy

          public void setPolicy(org.jboss.jca.core.spi.workmanager.policy.Policy v)

      Set the policy
      Specified by:
        `setPolicy` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### getSelector

          public org.jboss.jca.core.spi.workmanager.selector.Selector getSelector()

      Get the selector
      Specified by:
        `getSelector` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        The value

    - #### setSelector

          public void setSelector(org.jboss.jca.core.spi.workmanager.selector.Selector v)

      Set the selector
      Specified by:
        `setSelector` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### getTransport

          public org.jboss.jca.core.spi.workmanager.transport.Transport getTransport()

      Get the transport
      Specified by:
        `getTransport` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        The value

    - #### setTransport

          public void setTransport(org.jboss.jca.core.spi.workmanager.transport.Transport v)

      Set the transport
      Specified by:
        `setTransport` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### isDistributedStatisticsEnabled

          public boolean isDistributedStatisticsEnabled()

      Is distributed statistics enabled
      Specified by:
        `isDistributedStatisticsEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        True if enabled; otherwise false

    - #### setDistributedStatisticsEnabled

          public void setDistributedStatisticsEnabled(boolean v)

      Set the distributed statistics enabled flag
      Specified by:
        `setDistributedStatisticsEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### getNotificationListeners

          public java.util.Collection<org.jboss.jca.core.spi.workmanager.notification.NotificationListener> getNotificationListeners()

      Get the notification listeners attached
      Specified by:
        `getNotificationListeners` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        The value

    - #### setDoWorkDistributionEnabled

          public void setDoWorkDistributionEnabled(boolean v)

      Toggle distribution of Work instances for doWork
      Specified by:
        `setDoWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### isDoWorkDistributionEnabled

          public boolean isDoWorkDistributionEnabled()

      Is distribution of Work instances for doWork enabled
      Specified by:
        `isDoWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        True if enabled, otherwise false

    - #### setStartWorkDistributionEnabled

          public void setStartWorkDistributionEnabled(boolean v)

      Toggle distribution of Work instances for startWork
      Specified by:
        `setStartWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### isStartWorkDistributionEnabled

          public boolean isStartWorkDistributionEnabled()

      Is distribution of Work instances for startWork enabled
      Specified by:
        `isStartWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        True if enabled, otherwise false

    - #### setScheduleWorkDistributionEnabled

          public void setScheduleWorkDistributionEnabled(boolean v)

      Toggle distribution of Work instances for scheduleWork
      Specified by:
        `setScheduleWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `v` - The value

    - #### isScheduleWorkDistributionEnabled

          public boolean isScheduleWorkDistributionEnabled()

      Is distribution of Work instances for scheduleWork enabled
      Specified by:
        `isScheduleWorkDistributionEnabled` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        True if enabled, otherwise false

    - #### localDoWork

          public void localDoWork(javax.resource.spi.work.Work work)
                           throws javax.resource.spi.work.WorkException

      doWork locally
      Specified by:
        `localDoWork` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `work` - The work
      Throws:
        `javax.resource.spi.work.WorkException` - Thrown if an error occurs

    - #### localScheduleWork

          public void localScheduleWork(javax.resource.spi.work.Work work)
                                 throws javax.resource.spi.work.WorkException

      scheduleWork locally
      Specified by:
        `localScheduleWork` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `work` - The work
      Throws:
        `javax.resource.spi.work.WorkException` - Thrown if an error occurs

    - #### localStartWork

          public long localStartWork(javax.resource.spi.work.Work work)
                              throws javax.resource.spi.work.WorkException

      startWork locally
      Specified by:
        `localStartWork` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Parameters:
        `work` - The work
      Returns:
        The delay
      Throws:
        `javax.resource.spi.work.WorkException` - Thrown if an error occurs

    - #### doWork

          public void doWork(javax.resource.spi.work.Work work)
                      throws javax.resource.spi.work.WorkException

      Specified by:
        `doWork` in interface `javax.resource.spi.work.WorkManager`
      Overrides:
        `doWork` in class `WorkManagerImpl`
      Throws:
        `javax.resource.spi.work.WorkException`

    - #### startWork

          public long startWork(javax.resource.spi.work.Work work)
                         throws javax.resource.spi.work.WorkException

      Specified by:
        `startWork` in interface `javax.resource.spi.work.WorkManager`
      Overrides:
        `startWork` in class `WorkManagerImpl`
      Throws:
        `javax.resource.spi.work.WorkException`

    - #### scheduleWork

          public void scheduleWork(javax.resource.spi.work.Work work)
                            throws javax.resource.spi.work.WorkException

      Specified by:
        `scheduleWork` in interface `javax.resource.spi.work.WorkManager`
      Overrides:
        `scheduleWork` in class `WorkManagerImpl`
      Throws:
        `javax.resource.spi.work.WorkException`

    - #### getDistributedStatistics

          public org.jboss.jca.core.api.workmanager.DistributedWorkManagerStatistics getDistributedStatistics()

      Get the distributed statistics
      Specified by:
        `getDistributedStatistics` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`
      Returns:
        The value

    - #### deltaDoWorkAccepted

          protected void deltaDoWorkAccepted()

      Delta doWork accepted
      Overrides:
        `deltaDoWorkAccepted` in class `WorkManagerImpl`

    - #### deltaDoWorkRejected

          protected void deltaDoWorkRejected()

      Delta doWork rejected
      Overrides:
        `deltaDoWorkRejected` in class `WorkManagerImpl`

    - #### deltaStartWorkAccepted

          protected void deltaStartWorkAccepted()

      Delta startWork accepted
      Overrides:
        `deltaStartWorkAccepted` in class `WorkManagerImpl`

    - #### deltaStartWorkRejected

          protected void deltaStartWorkRejected()

      Delta startWork rejected
      Overrides:
        `deltaStartWorkRejected` in class `WorkManagerImpl`

    - #### deltaScheduleWorkAccepted

          protected void deltaScheduleWorkAccepted()

      Delta scheduleWork accepted
      Overrides:
        `deltaScheduleWorkAccepted` in class `WorkManagerImpl`

    - #### deltaScheduleWorkRejected

          protected void deltaScheduleWorkRejected()

      Delta scheduleWork rejected
      Overrides:
        `deltaScheduleWorkRejected` in class `WorkManagerImpl`

    - #### deltaWorkSuccessful

          protected void deltaWorkSuccessful()

      Delta work successful
      Overrides:
        `deltaWorkSuccessful` in class `WorkManagerImpl`

    - #### deltaWorkFailed

          protected void deltaWorkFailed()

      Delta work failed
      Overrides:
        `deltaWorkFailed` in class `WorkManagerImpl`

    - #### initialize

          public void initialize()

      Initialize
      Specified by:
        `initialize` in interface `org.jboss.jca.core.api.workmanager.DistributedWorkManager`

    - #### clone

          public org.jboss.jca.core.api.workmanager.WorkManager clone()
                                                               throws java.lang.CloneNotSupportedException

      Clone the WorkManager implementation
      Overrides:
        `clone` in class `WorkManagerImpl`
      Returns:
        A copy of the implementation
      Throws:
        `java.lang.CloneNotSupportedException` - Thrown if the copy operation isn't supported

    - #### toString

          public void toString(java.lang.StringBuilder sb)

      Additional string representation
      Overrides:
        `toString` in class `WorkManagerImpl`
      Parameters:
        `sb` - The string builder

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)