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

## org.apache.ode.utils
Class WatchDog.DefaultObserver<A>

    java.lang.Object
      org.apache.ode.utils.WatchDog.DefaultObserver<A>

All Implemented Interfaces:
  WatchDog.Observer<A>

Enclosing class:
  WatchDog<T,C extends WatchDog.Observer>

    public static class WatchDog.DefaultObserver<A>

extends java.lang.Object
implements WatchDog.Observer<A>

A default implementation of #ChangeHandler. Delete and Update will both invoke the #init method which satifies most use cases. So subclasses may simply override the #init method to fit their own needs.

Field Summary
`protected java.util.concurrent.locks.ReadWriteLock` | `lock`
`protected A` | `object`

Constructor Summary
`WatchDog.DefaultObserver()`

Method Summary
`A` | `get()`
`java.util.concurrent.locks.Lock` | `getLock()`
`void` | `init()` empty implementation
`boolean` | `isInitialized()`
`void` | `onDelete()` delegate to #init
`void` | `onUpdate()` delegate to #init

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### lock

    protected final java.util.concurrent.locks.ReadWriteLock lock

### object

    protected A object

Constructor Detail

### WatchDog.DefaultObserver

    public WatchDog.DefaultObserver()

Method Detail

### isInitialized

    public boolean isInitialized()

  Specified by:
    `isInitialized` in interface `WatchDog.Observer<A>`
  Returns:
    true if the wrapped if not null

### init

    public void init()

  empty implementation

  Specified by:
    `init` in interface `WatchDog.Observer<A>`

### onDelete

    public void onDelete()

  delegate to #init

  Specified by:
    `onDelete` in interface `WatchDog.Observer<A>`

### onUpdate

    public void onUpdate()

  delegate to #init

  Specified by:
    `onUpdate` in interface `WatchDog.Observer<A>`

### getLock

    public java.util.concurrent.locks.Lock getLock()

  Specified by:
    `getLock` in interface `WatchDog.Observer<A>`

### get

    public A get()

  Specified by:
    `get` in interface `WatchDog.Observer<A>`

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