org.jboss.jca.core.workmanager.policy

## Class WaterMark

- java.lang.Object
- - org.jboss.jca.core.workmanager.notification.AbstractNotificationListener
  - - org.jboss.jca.core.workmanager.policy.AbstractPolicy
    - - org.jboss.jca.core.workmanager.policy.WaterMark

- All Implemented Interfaces:
    org.jboss.jca.core.spi.workmanager.notification.NotificationListener, org.jboss.jca.core.spi.workmanager.policy.Policy

      public class WaterMark
      extends AbstractPolicy

  The always distribute policy
  Author:
    Jesper Pedersen

- - ### Field Summary

    - ### Fields inherited from class org.jboss.jca.core.workmanager.notification.AbstractNotificationListener

      `longRunning, shortRunning`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WaterMark()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getWatermark()` Get the water mark value
    `void` | `setWatermark(int value)` Set the water mark value
    `boolean` | `shouldDistribute(org.jboss.jca.core.api.workmanager.DistributedWorkManager dwm, javax.resource.spi.work.DistributableWork work)` Should a distribution of the work happen

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

      `getShouldDistribute`

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

      `deltaDoWorkAccepted, deltaDoWorkRejected, deltaScheduleWorkAccepted, deltaScheduleWorkRejected, deltaStartWorkAccepted, deltaStartWorkRejected, deltaWorkFailed, deltaWorkSuccessful, join, leave, updateLongRunningFree, updateShortRunningFree`

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

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

- - ### Constructor Detail

    - #### WaterMark

          public WaterMark()

      Constructor

  - ### Method Detail

    - #### shouldDistribute

          public boolean shouldDistribute(org.jboss.jca.core.api.workmanager.DistributedWorkManager dwm,
                                          javax.resource.spi.work.DistributableWork work)

      Should a distribution of the work happen
      Specified by:
        `shouldDistribute` in interface `org.jboss.jca.core.spi.workmanager.policy.Policy`
      Specified by:
        `shouldDistribute` in class `AbstractPolicy`
      Parameters:
        `dwm` - The invoking distributed work manager
        `work` - The work instance
      Returns:
        True, if the work should be distributed; otherwise false

    - #### getWatermark

          public int getWatermark()

      Get the water mark value
      Returns:
        The value

    - #### setWatermark

          public void setWatermark(int value)

      Set the water mark value
      Parameters:
        `value` - The value

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