Class EpollIoHandler

  • All Implemented Interfaces:
    IoHandler

    public class EpollIoHandler
    extends java.lang.Object
    implements IoHandler
    IoHandler which uses epoll under the covers. Only works on Linux!
    • Method Detail

      • openFileDescriptors

        @UnstableApi
        public void openFileDescriptors()
        This method is intended for use by a process checkpoint/restore integration, such as OpenJDK CRaC.
      • wakeup

        public void wakeup()
        Description copied from interface: IoHandler
        Wakeup the IoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.
        Specified by:
        wakeup in interface IoHandler
      • destroy

        public void destroy()
        Description copied from interface: IoHandler
        Destroy the IoHandler and free all its resources. Once destroyed using the IoHandler will cause undefined behaviour.
        Specified by:
        destroy in interface IoHandler
      • register

        public IoRegistration register​(IoHandle handle)
                                throws java.lang.Exception
        Description copied from interface: IoHandler
        Register a IoHandle for IO.
        Specified by:
        register in interface IoHandler
        Parameters:
        handle - the IoHandle to register.
        Throws:
        java.lang.Exception - thrown if an error happens during registration.
      • isCompatible

        public boolean isCompatible​(java.lang.Class<? extends IoHandle> handleType)
        Description copied from interface: IoHandler
        Returns true if the given type is compatible with this IoHandler and so can be registered, false otherwise.
        Specified by:
        isCompatible in interface IoHandler
        Parameters:
        handleType - the type of the IoHandle.
        Returns:
        if compatible of not.
      • closeFileDescriptors

        @UnstableApi
        public void closeFileDescriptors()
        This method is intended for use by process checkpoint/restore integration, such as OpenJDK CRaC. It's up to the caller to ensure that there is no concurrent use of the FDs while these are closed, e.g. by blocking the executor.