JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
feature_request_small.png
CLOSED  Feature request JPPF-575  -  IsMasterNode, IsSlaveNode and other convenience execution policies
Posted Feb 02, 2019 - updated Feb 11, 2019
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Feature request
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Core
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Targetted for
    icon_milestones.png JPPF 6.1
Issue description
Currently, an execution policy predicate to determine whether a node is a master or slave node is written as follows:
ExecutionPolicy masterPolicy = new Equal("jppf.node.provisioning.master", true);
with the XML equivalent:
<Equal valueType="boolean">
  <Property>jppf.node.provisioning.master</Property>
  <Value>true</Value>
</Equal>
This is quite cumbersome. We propose to implement simple policy classes instead, as follows:
ExecutionPolicy masterPolicy = new IsMasterNode();
ExecutionPolicy slavePolicy = new IsSlaveNode();
with the XML equivalents:
<IsMasterNode/>
<IsSlaveNode/>

#6
Comment posted by
 lolo4j
Feb 09, 10:19
Reopened this issue to add more convenient execution policies, based on configuration properties that are not very clearly documented ( except here) and are mostly there to be used in execution policies or node selectors anyway:
  • IsLocalChannel: wrapper for new Equal("jppf.channel.local", true) (applies to client- and server-side SLAs)
  • IsPeerDriver: wrapper for new Equal("jppf.peer.driver", true) (server-side SLA)
  • others?