Interface Lock

All Known Implementing Classes:
CombinedLock, OccupancyLock, RouteLock, TimeLock, TrafficLock, TrafficRelay, TurnoutLock

public interface Lock
A Lock is the base interface for implementations that check layout conditions.

Locks are used in multiple places: Machine and Field. They can be used to lock out various operations: Turnout, Signal. Those contexts are handled in how Locks are configured into other objects.

  • Field Details

  • Method Details

    • isLockClear

      boolean isLockClear(LockLogger lockLogger)
      Test the lock conditions
      Parameters:
      lockLogger - the logger on which to emit status messages
      Returns:
      True if lock is clear and operation permitted
    • checkLocksClear

      static boolean checkLocksClear(List<Lock> locks, LockLogger lockLogger)
      Check a collection of Locks, handling the logging etc as needed.
      Parameters:
      locks - collection of locks.
      lockLogger - the logger on which to emit status messages
      Returns:
      false if a lock is not clear, else true.