Class AccumuloConfiguration

    • Constructor Detail

      • AccumuloConfiguration

        public AccumuloConfiguration()
    • Method Detail

      • get

        public String get​(String property)
        Gets a property value from this configuration.

        Note: this is inefficient, but convenient on occasion. For retrieving multiple properties, use getProperties(Map, Predicate) with a custom filter.

        Parameters:
        property - property to get
        Returns:
        property value
      • get

        public abstract String get​(Property property)
        Gets a property value from this configuration.
        Parameters:
        property - property to get
        Returns:
        property value
      • resolve

        public Property resolve​(Property property,
                                Property deprecatedProperty)
        Given a property and a deprecated property determine which one to use base on which one is set.
      • getProperties

        public abstract void getProperties​(Map<String,​String> props,
                                           Predicate<String> filter)
        Returns property key/value pairs in this configuration. The pairs include those defined in this configuration which pass the given filter, and those supplied from the parent configuration which are not included from here.
        Parameters:
        props - properties object to populate
        filter - filter for accepting properties from this configuration
      • getUpdateCount

        public long getUpdateCount()
        Each time configuration changes, this counter should increase. Anything that caches information that is derived from configuration can use this method to know when to update.
      • getAllPropertiesWithPrefix

        public Map<String,​String> getAllPropertiesWithPrefix​(Property property)
        Gets all properties under the given prefix in this configuration.
        Parameters:
        property - prefix property, must be of type PropertyType.PREFIX
        Returns:
        a map of property keys to values
        Throws:
        IllegalArgumentException - if property is not a prefix
      • getTimeInMillis

        public long getTimeInMillis​(Property property)
        Gets a property of type PropertyType.TIMEDURATION, interpreting the value properly.
        Parameters:
        property - property to get
        Returns:
        property value
        Throws:
        IllegalArgumentException - if the property is of the wrong type
      • getBoolean

        public boolean getBoolean​(Property property)
        Gets a property of type PropertyType.BOOLEAN, interpreting the value properly (using Boolean.parseBoolean()).
        Parameters:
        property - property to get
        Returns:
        property value
        Throws:
        IllegalArgumentException - if the property is of the wrong type
      • getFraction

        public double getFraction​(Property property)
        Gets a property of type PropertyType.FRACTION, interpreting the value properly.
        Parameters:
        property - property to get
        Returns:
        property value
        Throws:
        IllegalArgumentException - if the property is of the wrong type
      • getPort

        public int[] getPort​(Property property)
        Gets a property of type PropertyType.PORT, interpreting the value properly (as an integer within the range of non-privileged ports).
        Parameters:
        property - property to get
        Returns:
        property value
        Throws:
        IllegalArgumentException - if the property is of the wrong type
      • getCount

        public int getCount​(Property property)
        Gets a property of type PropertyType.COUNT, interpreting the value properly (as an integer).
        Parameters:
        property - property to get
        Returns:
        property value
        Throws:
        IllegalArgumentException - if the property is of the wrong type
      • isPropertySet

        public boolean isPropertySet​(Property prop,
                                     boolean cacheAndWatch)
      • invalidateCache

        public void invalidateCache()
        Invalidates the ZooCache used for storage and quick retrieval of properties for this configuration.