Class MemQConnector

    • Constructor Detail

      • MemQConnector

        public MemQConnector()
        Class constructor
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object o)
                        throws java.lang.Exception
        Method reads initialization params ,creates new pipe and calls initDB if persistence is enabled. Checks if user has enabled property to use earlier behavior of MEMQConnector in iterator mode where no new queue will be created if queue does not exist.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        o - The connector mode of the Connector. The object should be of type ConnectorMode.
        Throws:
        java.lang.Exception
      • putEntry

        public void putEntry​(Entry entry)
                      throws java.lang.Exception
        Adds the given entry object to the MemQ
        Specified by:
        putEntry in interface ConnectorInterface
        Overrides:
        putEntry in class Connector
        Parameters:
        entry - entry to be added
        Throws:
        java.lang.Exception - if an error occurs
      • setTimeout

        public void setTimeout​(int timeout)
        Sets the time out parameter
        Parameters:
        timeout - value to be set
      • hasMore

        public boolean hasMore()
        Checks if the specified memq has more entries
        Returns:
        true if not empty
      • getVersion

        public java.lang.String getVersion()
        Returns version information
        Specified by:
        getVersion in interface VersionInfoInterface
        Returns:
        version info
      • purgeQueue

        public void purgeQueue()
                        throws java.lang.Exception
        Purges the queue. Wrapper over the MemBufferQ.purgeQueue()
        Throws:
        java.lang.Exception
      • terminate

        public void terminate()
                       throws java.lang.Exception
        Method is called when the Connector terminates
        Specified by:
        terminate in interface ConnectorInterface
        Overrides:
        terminate in class Connector
        Throws:
        java.lang.Exception - never
      • acquireLock

        public void acquireLock()
                         throws java.lang.InterruptedException
        Acquire lock on memq
        Throws:
        java.lang.InterruptedException
      • releaseLock

        public void releaseLock()
        Release the lock on memq
      • isReleaseOnALEnd

        public boolean isReleaseOnALEnd()
        Checks if lock is to be released on AL cycle end
        Returns:
        true if it should be, false otherwise
      • setReleaseOnALCycleEnd

        public void setReleaseOnALCycleEnd​(boolean isReleaseOnALCycleEnd)
        Sets the isReleaseOnALCycleEnd variable
        Parameters:
        isReleaseOnALCycleEnd -
      • getMode

        public int getMode()
        Returns the mode of the connector
        Returns:
        the number of the mode
      • setMode

        public void setMode​(int mode)
        Sets the mode of the connector. Can be Add Only and Iterator.
        Parameters:
        mode - value to set