org.quartz.locality
Class NodeSpecBuilder

java.lang.Object
  extended by org.quartz.locality.NodeSpecBuilder

public class NodeSpecBuilder
extends java.lang.Object

Builder for NodeSpec, specifically required for the DSL builder-style API:

 localJob(
     newJob(CheckForNode1AndWaitJob.class)
         .withIdentity("testJob")
         .storeDurably(true)
         .build())
     .where(
         node()
             .is(partOfNodeGroup("group1")))
     .build();
 
* @author Alex Snaps


Constructor Summary
NodeSpecBuilder()
           
 
Method Summary
 NodeSpec build()
          Method that creates the NodeSpec represented by this builder
 NodeSpecBuilder has(Constraint constraint)
          DSL method to add a constraint
 NodeSpecBuilder is(Constraint constraint)
          DSL method to add a constraint
static NodeSpecBuilder node()
          Factory method
 NodeSpecBuilder set(Constraint... constraintsToAdd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeSpecBuilder

public NodeSpecBuilder()
Method Detail

set

public NodeSpecBuilder set(Constraint... constraintsToAdd)

build

public NodeSpec build()
Method that creates the NodeSpec represented by this builder

Returns:
The NodeSpec instance

node

public static NodeSpecBuilder node()
Factory method

Returns:
A NodeSpecBuilder instance

is

public NodeSpecBuilder is(Constraint constraint)
DSL method to add a constraint

Parameters:
constraint - The constraint to be added to the list
Returns:
this

has

public NodeSpecBuilder has(Constraint constraint)
DSL method to add a constraint

Parameters:
constraint - The constraint to be added to the list
Returns:
this


Copyright 2001-2011, Terracotta, Inc.