org.apache.commons.configuration2.sync

## Enum NoOpSynchronizer

- java.lang.Object
- - java.lang.Enum<NoOpSynchronizer>
  - - org.apache.commons.configuration2.sync.NoOpSynchronizer

- All Implemented Interfaces:
    Serializable, Comparable<NoOpSynchronizer>, Synchronizer

      public enum NoOpSynchronizer
      extends Enum<NoOpSynchronizer>
      implements Synchronizer

  An implementation of the `Synchronizer` interface which does not perform any synchronization.

  This class is the option of choice for applications that do not access configuration concurrently. All methods required by the `Synchronizer` interface are just empty dummies. Therefore, this class does not have any synchronization overhead. Of course, configurations using this `Synchronizer` implementation are not thread-safe!

  Implementation note: This class is an enumeration because only a single instance needs to exist. This instance can be shared between arbitrary configurations.

  Since:
    2.0
  Version:
    $Id: NoOpSynchronizer.java 1624601 2014-09-12 18:04:36Z oheger $

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE` The single shared instance of this class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginRead()` Notifies this `Synchronizer` that the current thread is going to start a read operation on the managed configuration.
    `void` | `beginWrite()` Notifies this `Synchronizer` that the current thread is going to start a write operation on the managed configuration.
    `void` | `endRead()` Notifies this `Synchronizer` that the current thread has finished its read operation.
    `void` | `endWrite()` Notifies this `Synchronizer` that the current thread has finished its write operation.
    `static NoOpSynchronizer` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static NoOpSynchronizer[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final NoOpSynchronizer INSTANCE

      The single shared instance of this class.

  - ### Method Detail

    - #### values

          public static NoOpSynchronizer[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (NoOpSynchronizer c : NoOpSynchronizer.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static NoOpSynchronizer valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### beginRead

          public void beginRead()

      Description copied from interface: `Synchronizer`
      Notifies this `Synchronizer` that the current thread is going to start a read operation on the managed configuration. This call can block if a concrete implementation decides that the thread has to wait until a specific condition is fulfilled.
      Specified by:
        `beginRead` in interface `Synchronizer`

    - #### endRead

          public void endRead()

      Description copied from interface: `Synchronizer`
      Notifies this `Synchronizer` that the current thread has finished its read operation. This may cause other waiting threads to be granted access to the managed configuration.
      Specified by:
        `endRead` in interface `Synchronizer`

    - #### beginWrite

          public void beginWrite()

      Description copied from interface: `Synchronizer`
      Notifies this `Synchronizer` that the current thread is going to start a write operation on the managed configuration. This call may block. For instance, a concrete implementation may suspend the thread until all read operations currently active are finished,
      Specified by:
        `beginWrite` in interface `Synchronizer`

    - #### endWrite

          public void endWrite()

      Description copied from interface: `Synchronizer`
      Notifies this `Synchronizer` that the current thread has finished its write operation. This may cause other waiting threads to be granted access to the managed configuration.
      Specified by:
        `endWrite` in interface `Synchronizer`

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.