Class RepositoryConnection

  • All Implemented Interfaces:
    IRepositoryConnection

    public class RepositoryConnection
    extends java.lang.Object
    implements IRepositoryConnection
    An instance of this class represents a persistently-stored repository connection description. This is the paper object meant for editing and manipulation.
    • Field Detail

      • isNew

        protected boolean isNew
      • name

        protected java.lang.String name
      • description

        protected java.lang.String description
      • className

        protected java.lang.String className
      • authorityName

        protected java.lang.String authorityName
      • maxCount

        protected int maxCount
      • throttles

        protected java.util.HashMap throttles
    • Constructor Detail

      • RepositoryConnection

        public RepositoryConnection()
        Constructor.
    • Method Detail

      • duplicate

        public RepositoryConnection duplicate()
        Clone this object.
        Returns:
        the cloned object.
      • setIsNew

        public void setIsNew​(boolean isnew)
        Set 'isnew' condition.
        Specified by:
        setIsNew in interface IRepositoryConnection
        Parameters:
        isnew - true if this is a new instance.
      • getIsNew

        public boolean getIsNew()
        Get 'isnew' condition.
        Specified by:
        getIsNew in interface IRepositoryConnection
        Returns:
        true if this is a new connection, false otherwise.
      • setName

        public void setName​(java.lang.String name)
        Set name.
        Specified by:
        setName in interface IRepositoryConnection
        Parameters:
        name - is the name.
      • setDescription

        public void setDescription​(java.lang.String description)
        Set description.
        Specified by:
        setDescription in interface IRepositoryConnection
        Parameters:
        description - is the description.
      • setClassName

        public void setClassName​(java.lang.String className)
        Set the class name.
        Specified by:
        setClassName in interface IRepositoryConnection
        Parameters:
        className - is the class name.
      • setACLAuthority

        public void setACLAuthority​(java.lang.String authorityName)
        Set the ACL authority name.
        Specified by:
        setACLAuthority in interface IRepositoryConnection
        Parameters:
        authorityName - is the ACL authority name.
      • getACLAuthority

        public java.lang.String getACLAuthority()
        Get the ACL authority name.
        Specified by:
        getACLAuthority in interface IRepositoryConnection
        Returns:
        the ACL authority name.
      • setMaxConnections

        public void setMaxConnections​(int maxCount)
        Set the maximum size of the connection pool.
        Specified by:
        setMaxConnections in interface IRepositoryConnection
        Parameters:
        maxCount - is the maximum connection count per JVM.
      • getMaxConnections

        public int getMaxConnections()
        Get the maximum size of the connection pool.
        Specified by:
        getMaxConnections in interface IRepositoryConnection
        Returns:
        the maximum size.
      • addThrottleValue

        public void addThrottleValue​(java.lang.String match,
                                     java.lang.String description,
                                     float throttle)
        Add a throttle value.
        Specified by:
        addThrottleValue in interface IRepositoryConnection
        Parameters:
        description - is the throttle description.
        match - is the regexp to be applied to the bin names.
        throttle - is the fetch rate to use, in fetches per millisecond.
      • deleteThrottleValue

        public void deleteThrottleValue​(java.lang.String match)
        Delete a throttle.
        Specified by:
        deleteThrottleValue in interface IRepositoryConnection
        Parameters:
        match - is the regexp describing the throttle to be removed.
      • getThrottles

        public java.lang.String[] getThrottles()
        Get throttles. This will return a list of match strings, ordered by description and then match string.
        Specified by:
        getThrottles in interface IRepositoryConnection
        Returns:
        the ordered list of throttles.
      • getThrottleDescription

        public java.lang.String getThrottleDescription​(java.lang.String match)
        Get the description for a throttle.
        Specified by:
        getThrottleDescription in interface IRepositoryConnection
        Parameters:
        match - describes the throttle.
        Returns:
        the description.
      • getThrottleValue

        public float getThrottleValue​(java.lang.String match)
        Get the throttle value for a throttle.
        Specified by:
        getThrottleValue in interface IRepositoryConnection
        Parameters:
        match - describes the throttle.
        Returns:
        the throttle value, in fetches per millisecond.
      • setThrottle

        public void setThrottle​(java.lang.Float rate)
        Set the maximum number of document fetches per millisecond.
        Specified by:
        setThrottle in interface IRepositoryConnection
        Parameters:
        rate - is the rate, in fetches/millisecond.
      • getThrottle

        public java.lang.Float getThrottle()
        Get the maximum number of document fetches per millisecond.
        Specified by:
        getThrottle in interface IRepositoryConnection
        Returns:
        fetches/ms, or null if there is no throttle.