Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz.utils.counter
Interface Counter

All Known Subinterfaces:
  SampledCounter, SampledRateCounter

All Known Implementing Classes:
  CounterImpl, SampledCounterImpl, SampledRateCounterImpl

    public interface Counter

A simple counter

Since:
  1.8
Author:
  Abhishek Sanoujam

Method Summary
`long` | `decrement()` Decrement the counter by 1
`long` | `decrement(long amount)` Decrement the counter by given amount
`long` | `getAndSet(long newValue)` Returns the value of the counter and sets it to the new value
`long` | `getValue()` Gets current value of the counter
`long` | `increment()` Increment the counter by 1
`long` | `increment(long amount)` Increment the counter by given amount
`void` | `setValue(long newValue)` Sets the value of the counter to the supplied value

Method Detail

### increment

    long increment()

  Increment the counter by 1

  Returns:
    the value after incrementing

### decrement

    long decrement()

  Decrement the counter by 1

  Returns:
    the value after decrementing

### getAndSet

    long getAndSet(long newValue)

  Returns the value of the counter and sets it to the new value

  Parameters:
    `newValue` -
  Returns:
    Returns the old value

### getValue

    long getValue()

  Gets current value of the counter

  Returns:
    current value of the counter

### increment

    long increment(long amount)

  Increment the counter by given amount

  Parameters:
    `amount` -
  Returns:
    the value of the counter after incrementing

### decrement

    long decrement(long amount)

  Decrement the counter by given amount

  Parameters:
    `amount` -
  Returns:
    the value of the counter after decrementing

### setValue

    void setValue(long newValue)

  Sets the value of the counter to the supplied value

  Parameters:
    `newValue` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001-2012, Terracotta, Inc.