Class SharedFileLocker

  • All Implemented Interfaces:
    Locker, org.apache.activemq.Service

    public class SharedFileLocker
    extends AbstractLocker
    Represents an exclusive lock on a database to avoid multiple brokers running against the same logical database.
    • Method Detail

      • doStart

        public void doStart()
                     throws Exception
        Specified by:
        doStart in class org.apache.activemq.util.ServiceSupport
        Throws:
        Exception
      • keepAlive

        public boolean keepAlive()
        Description copied from interface: Locker
        Used by a timer to keep alive the lock. If the method returns false the broker should be terminated if an exception is thrown, the lock state cannot be determined
        Specified by:
        keepAlive in interface Locker
        Overrides:
        keepAlive in class AbstractLocker
      • doStop

        public void doStop​(org.apache.activemq.util.ServiceStopper stopper)
                    throws Exception
        Specified by:
        doStop in class org.apache.activemq.util.ServiceSupport
        Throws:
        Exception
      • configure

        public void configure​(PersistenceAdapter persistenceAdapter)
                       throws IOException
        Description copied from interface: Locker
        Optionally configure the locker with the persistence adapter currently used You can use persistence adapter configuration details like, data directory datasource, etc. to be used by the locker
        Throws:
        IOException