Interface OpenCloseManager

All Known Implementing Classes:
InMemoryOpenCloseManager, PersistentOpenCloseManager

public interface OpenCloseManager
Interface for tracking the open/close state at an address.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(Address address)
    Sets the state at the given address to be "closed".
    void
    Sets all address to "closed" (Makes "closed" the default state and clears all individual settings.
    boolean
    isOpen(Address address)
    Checks if the state is "open" for the given address.
    boolean
    Checks if the default state is "open".
    void
    open(Address address)
    Sets the state at the given address to be "open".
    void
    Sets all address to "open" (Makes "open" the default state and clears all individual settings.
  • Method Details

    • isOpen

      boolean isOpen(Address address)
      Checks if the state is "open" for the given address.
      Parameters:
      address - the address to test
      Returns:
      true if the state of the given address is "open"
    • open

      void open(Address address)
      Sets the state at the given address to be "open".
      Parameters:
      address - the address to set "open"
    • close

      void close(Address address)
      Sets the state at the given address to be "closed".
      Parameters:
      address - the address to set "closed"
    • isOpenByDefault

      boolean isOpenByDefault()
      Checks if the default state is "open".
      Returns:
      true if the default state for addresses is "open"
    • openAll

      void openAll()
      Sets all address to "open" (Makes "open" the default state and clears all individual settings.
    • closeAll

      void closeAll()
      Sets all address to "closed" (Makes "closed" the default state and clears all individual settings.