net.conquiris.api.index
Class Delays

java.lang.Object
  extended by net.conquiris.api.index.Delays
All Implemented Interfaces:
Serializable

@Immutable
public final class Delays
extends Object
implements Serializable

Indexing delays specification. The delays are expressed in ms and must be >= 0, otherwise the methods throw IllegalArgumentException.

Author:
Andres Rodriguez
See Also:
Serialized Form

Method Summary
static Delays constant(long delay)
          Returns a constant delay specification.
 boolean equals(Object obj)
           
 long getError()
          Returns the error delay.
 long getIdle()
          Returns the idle delay.
 long getNormal()
          Returns the normal delay.
 int hashCode()
           
static Delays of(long normal, long idle, long error)
          Returns a delay specification.
 Delays setError(long error)
          Returns a delay specification equal to this one but with the provided error delay.
 Delays setIdle(long idle)
          Returns a delay specification equal to this one but with the provided idle delay.
 Delays setNormal(long normal)
          Returns a delay specification equal to this one but with the provided normal delay.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

constant

public static Delays constant(long delay)
Returns a constant delay specification.


of

public static Delays of(long normal,
                        long idle,
                        long error)
Returns a delay specification.

Parameters:
normal - Normal delay.
idle - Idle delay.
error - Error delay.
Returns:
The requested specification.

getNormal

public long getNormal()
Returns the normal delay.


setNormal

public Delays setNormal(long normal)
Returns a delay specification equal to this one but with the provided normal delay.


setIdle

public Delays setIdle(long idle)
Returns a delay specification equal to this one but with the provided idle delay.


setError

public Delays setError(long error)
Returns a delay specification equal to this one but with the provided error delay.


getIdle

public long getIdle()
Returns the idle delay.


getError

public long getError()
Returns the error delay.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 Derquinse Projects.. All Rights Reserved.