com.atlassian.scheduler.config
Class JobId

java.lang.Object
  extended by com.atlassian.scheduler.config.JobId
All Implemented Interfaces:
Serializable, Comparable<JobId>

@Immutable
@PublicApi
public final class JobId
extends Object
implements Serializable, Comparable<JobId>

A wrapper to distinguish job IDs from simple strings and to make it easier to avoid confusing them with job runner keys.

Since:
v1.0
See Also:
Serialized Form

Method Summary
 int compareTo(JobId o)
           
 boolean equals(Object o)
           
 int hashCode()
           
static JobId of(String id)
          Wraps the provided string as a JobId.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static JobId of(@Nonnull
                       String id)
Wraps the provided string as a JobId.

Parameters:
id - the job ID, as a string
Returns:
the wrapped job runner key

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(JobId o)
Specified by:
compareTo in interface Comparable<JobId>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Atlassian. All Rights Reserved.