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.apache.tapestry5.ioc.internal.util
Class OneShotLock

    java.lang.Object
      org.apache.tapestry5.ioc.internal.util.LockSupport
          org.apache.tapestry5.ioc.internal.util.OneShotLock

    public class OneShotLock

extends LockSupport

Logic for handling one shot semantics for classes; classes that include a method (or methods) that "locks down" the instance, to prevent it from being used again in the future.

Constructor Summary
`OneShotLock()`

Method Summary
`void` | `check()` Checks to see if the lock has been set (via `lock()`).
`void` | `lock()` Checks the lock, then sets it.

Methods inherited from class org.apache.tapestry5.ioc.internal.util.LockSupport
`acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock`

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

Constructor Detail

### OneShotLock

    public OneShotLock()

Method Detail

### check

    public void check()

  Checks to see if the lock has been set (via `lock()`).

  Throws:
    `java.lang.IllegalStateException` - if the lock is set

### lock

    public void lock()

  Checks the lock, then sets it.

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 © 2003-2012 The Apache Software Foundation.