Class AbstractMessageStore

    • Field Detail

      • name

        protected String name
        message store name
      • sequence

        protected String sequence
        name of the sequence to be executed before storing the message
      • messageStoreMBean

        protected MessageStoreView messageStoreMBean
        Message store JMX view
      • synapseConfiguration

        protected SynapseConfiguration synapseConfiguration
        synapse configuration reference
      • synapseEnvironment

        protected SynapseEnvironment synapseEnvironment
        synapse environment reference
      • parameters

        protected Map<String,​Object> parameters
        Message store parameters
      • parameterKeyMap

        protected Map<String,​String> parameterKeyMap
        Message store parameters with registry keys
      • description

        protected String description
        Message Store description
      • fileName

        protected String fileName
        Name of the file where this message store is defined
      • messageStoreObservers

        protected List<MessageStoreObserver> messageStoreObservers
        List that holds the MessageStore observers registered with the Message Store
      • lock

        protected Lock lock
    • Constructor Detail

      • AbstractMessageStore

        public AbstractMessageStore()
    • Method Detail

      • init

        public void init​(SynapseEnvironment se)
        Description copied from interface: ManagedLifecycle
        This method should implement the initialization of the implemented parts of the configuration.
        Specified by:
        init in interface ManagedLifecycle
        Parameters:
        se - SynapseEnvironment to be used for initialization
      • getName

        public String getName()
        Description copied from interface: Nameable
        Get the name of an abstraction
        Specified by:
        getName in interface Nameable
        Returns:
        String Representation of name
      • setName

        public void setName​(String name)
        Description copied from interface: Nameable
        Set the name of an abstraction
        Specified by:
        setName in interface Nameable
        Parameters:
        name - String Representation of name
      • notifyMessageAddition

        protected void notifyMessageAddition​(String messageId)
        Notify Message Addition to the observers
        Parameters:
        messageId - of the Message added.
      • notifyMessageRemoval

        protected void notifyMessageRemoval​(String messageId)
        Notify Message removal to the observers
        Parameters:
        messageId - of the Message added
      • size

        public int size()
        Description copied from interface: MessageStore
        Returns the number of Messages in this store.
        Specified by:
        size in interface MessageStore
        Returns:
        the number of Messages in this Store
      • setParameters

        public void setParameters​(Map<String,​Object> parameters)
        Description copied from interface: MessageStore
        set the implementation specific parameters
        Specified by:
        setParameters in interface MessageStore
        Parameters:
        parameters - A map of parameters or null
      • addParameter

        public void addParameter​(String name,
                                 String key)
        Description copied from interface: MessageStore
        Adds message store specific parameters
        Specified by:
        addParameter in interface MessageStore
        Parameters:
        name - parameter name
        key - parameter key value
      • addParameterKey

        public void addParameterKey​(String name,
                                    String key)
        Description copied from interface: MessageStore
        Adds message store parameter registry keys
        Specified by:
        addParameterKey in interface MessageStore
        Parameters:
        name - parameter name
        key - parameter registry key value
      • getParameterKey

        public String getParameterKey​(String name)
        Description copied from interface: MessageStore
        Gets parameter registry key from the parameter name
        Specified by:
        getParameterKey in interface MessageStore
        Parameters:
        name - parameter name
        Returns:
        registry key of parameter value
      • destroy

        public void destroy()
        Description copied from interface: ManagedLifecycle
        This method should implement the destroying of the implemented parts of the configuration.
        Specified by:
        destroy in interface ManagedLifecycle
      • setDescription

        public void setDescription​(String description)
        Description copied from interface: SynapseArtifact
        Set the description of the artifact
        Specified by:
        setDescription in interface SynapseArtifact
        Parameters:
        description - tobe set to the artifact
      • setFileName

        public void setFileName​(String filename)
        Description copied from interface: MessageStore
        Set the name of the file that the Message store is configured
        Specified by:
        setFileName in interface MessageStore
        Parameters:
        filename - Name of the file where this artifact is defined
      • getFileName

        public String getFileName()
        Description copied from interface: MessageStore
        get the file name that the message store is configured
        Specified by:
        getFileName in interface MessageStore
        Returns:
        Name of the file where this artifact is defined
      • getLock

        public Lock getLock()
      • nextProducerId

        public int nextProducerId()
      • nextConsumerId

        public int nextConsumerId()
      • enqueued

        public void enqueued()
      • dequeued

        public void dequeued()
      • difference

        public long difference()
      • isEdited

        public boolean isEdited()
        Whether the message store edited through the management console
        Specified by:
        isEdited in interface MessageStore
        Returns:
        isEdited
      • setIsEdited

        public void setIsEdited​(boolean isEdited)
        Set whether the message store edited through the management console
        Specified by:
        setIsEdited in interface MessageStore
        Parameters:
        isEdited -
      • getArtifactContainerName

        public String getArtifactContainerName()
        Get the name of the artifact container from which the message store deployed
        Specified by:
        getArtifactContainerName in interface MessageStore
        Returns:
        artifactContainerName
      • setArtifactContainerName

        public void setArtifactContainerName​(String artifactContainerName)
        Set the name of the artifact container from which the message store deployed
        Specified by:
        setArtifactContainerName in interface MessageStore
        Parameters:
        artifactContainerName -