Interface CriticalCloseable

All Superinterfaces:
ArtemisCloseable, AutoCloseable

public interface CriticalCloseable extends ArtemisCloseable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beforeClose(ArtemisCloseable otherCloseable)
    This will set something to be called right before closing.

    Methods inherited from interface org.apache.activemq.artemis.utils.ArtemisCloseable

    close
  • Method Details

    • beforeClose

      void beforeClose(ArtemisCloseable otherCloseable)
      This will set something to be called right before closing.

      The use case that drove this call was a ReadWriteLock on the journal. Imagine that you need to call enterCritical, readWrite.lock() and then unlock and leaveCritical. By using this call I could reuse the same instance on the readWriteLock.