## org.jgroups.demos
Class LockServiceDemo

    java.lang.Object
      org.jgroups.demos.LockServiceDemo

All Implemented Interfaces:
  LockNotification

    public class LockServiceDemo

extends java.lang.Object
implements LockNotification

Demos the LockService

Field Summary
`protected JChannel` `ch`
`protected LockService` `lock_service`
`protected java.lang.String` `name`
`protected java.lang.String` `props`

Constructor Summary
`LockServiceDemo(java.lang.String props, java.lang.String name)`

Method Summary
`void` `awaited(java.lang.String lock_name, Owner owner)`
`void` `awaiting(java.lang.String lock_name, Owner owner)`
`protected static void` `help()`
`void` `lockCreated(java.lang.String name)`
`void` `lockDeleted(java.lang.String name)`
`void` `locked(java.lang.String lock_name, Owner owner)`
`protected void` `loop()`
`static void` `main(java.lang.String[] args)`
`protected static java.util.List<java.lang.String>` `parseLockNames(java.lang.String line)`
`protected void` `printLocks()`
`void` `start()`
`void` `unlocked(java.lang.String lock_name, Owner owner)`

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

Field Detail

### props

    protected java.lang.String props

### ch

    protected JChannel ch

### lock_service

    protected LockService lock_service

### name

    protected java.lang.String name

Constructor Detail

### LockServiceDemo

    public LockServiceDemo(java.lang.String props,
                           java.lang.String name)

Method Detail

### start

    public void start()
               throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### lockCreated

    public void lockCreated(java.lang.String name)

  Specified by:
    `lockCreated` in interface `LockNotification`

### lockDeleted

    public void lockDeleted(java.lang.String name)

  Specified by:
    `lockDeleted` in interface `LockNotification`

### locked

    public void locked(java.lang.String lock_name,
                       Owner owner)

  Specified by:
    `locked` in interface `LockNotification`

### unlocked

    public void unlocked(java.lang.String lock_name,
                         Owner owner)

  Specified by:
    `unlocked` in interface `LockNotification`

### awaiting

    public void awaiting(java.lang.String lock_name,
                         Owner owner)

  Specified by:
    `awaiting` in interface `LockNotification`

### awaited

    public void awaited(java.lang.String lock_name,
                        Owner owner)

  Specified by:
    `awaited` in interface `LockNotification`

### loop

    protected void loop()
                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### parseLockNames

    protected static java.util.List<java.lang.String> parseLockNames(java.lang.String line)

### printLocks

    protected void printLocks()

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### help

    protected static void help()

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.