Example #1
0
        /**
         * Sets datasource name to a new value
         *
         * @param newDsName New datasource name
         * @ Thrown in case of I/O error
         */
        public void setDsName(String newDsName)
        {
            if (newDsName != null && newDsName.Length > RrdString.STRING_LENGTH)
            {
                throw new ArgumentException("Invalid datasource name specified: " + newDsName);
            }
            if (parentDb.containsDs(newDsName))
            {
                throw new ArgumentException("Datasource already defined in this RRD: " + newDsName);
            }

            this.dsName.set(newDsName);
        }