org.quartz.locality
Class LocalityJobBuilder

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

public class LocalityJobBuilder
extends Object

Builder for LocalityAware JobDetail instances.

 localJob(
     newJob(CheckForNode1AndWaitJob.class)
         .withIdentity("testJob")
         .storeDurably(true)
         .build())
     .where(
         node()
             .is(partOfNodeGroup("group1")))
     .build();
 

Author:
Alex Snaps

Constructor Summary
LocalityJobBuilder(JobBuilder jobBuilder)
           
 
Method Summary
 LocalityJobDetail build()
          Method building an immutable LocalityAware JobDetail, wrapping the actual JobDetail instance If a JobBuilder was used at construction time, its build method is invoked
static LocalityJobBuilder localJob(JobBuilder jobBuilder)
          Factory method to create builder to a wrapping LocalityAware JobDetailBuilder
static LocalityJobBuilder localJob(JobDetail jobDetail)
          Factory method to create builder to a wrapping LocalityAware JobDetail
 LocalityJobBuilder where(NodeSpecBuilder spec)
          Setter to the NodeSpecBuilder that will be build at JobDetail build() time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalityJobBuilder

public LocalityJobBuilder(JobBuilder jobBuilder)
Method Detail

localJob

public static LocalityJobBuilder localJob(JobDetail jobDetail)
Factory method to create builder to a wrapping LocalityAware JobDetail

Parameters:
jobDetail - The JobDetail to wrap
Returns:
the LocalityJobBuilder instance

localJob

public static LocalityJobBuilder localJob(JobBuilder jobBuilder)
Factory method to create builder to a wrapping LocalityAware JobDetailBuilder

Parameters:
jobBuilder - The JobBuilder to wrap
Returns:
the LocalityJobBuilder instance

where

public LocalityJobBuilder where(NodeSpecBuilder spec)
Setter to the NodeSpecBuilder that will be build at JobDetail build() time

Parameters:
spec - The builder to the node specifications
Returns:
this

build

public LocalityJobDetail build()
Method building an immutable LocalityAware JobDetail, wrapping the actual JobDetail instance If a JobBuilder was used at construction time, its build method is invoked

Returns:
the LocalityJobDetail instance


Copyright 2001-2013, Terracotta, Inc.