2362N/A * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * ZoneNode extends NameNode to represent a tree of the zones in the 0N/A * DNS namespace, along with any intermediate nodes between zones. 0N/A * A ZoneNode that represents a zone may be "populated" with a 0N/A * NameNode tree containing the zone's contents. 0N/A * <p> A populated zone's contents will be flagged as having expired after 0N/A * the time specified by the minimum TTL value in the zone's SOA record. 0N/A * <p> Since zone cuts aren't directly modeled by a tree of ZoneNodes, 0N/A * ZoneNode.isZoneCut() always returns false. 0N/A * <p> The zone's contents are accessed via a soft reference, so its 0N/A * heap space may be reclaimed when necessary. The zone may be 0N/A * repopulated later. 0N/A * @author Scott Seligman 0N/A * Clears the contents of this node. If the node was flagged as 0N/A * expired, it remains so. 0N/A * Is this node currently populated? 0N/A * Returns the zone's contents, or null if the zone is not populated. 0N/A * Has this zone's data expired? 0N/A * Returns the deepest populated zone on the path specified by a 0N/A * fully-qualified domain name, or null if there is no populated 0N/A * zone on that path. Note that a node may be depopulated after 0N/A for (
int i =
1; i <
fqdn.
size(); i++) {
// "i=1" to skip root label 0N/A * Populates (or repopulates) a zone given its own fully-qualified 0N/A * name and its resource records. Returns the zone's new contents. 0N/A // assert zone.get(0).equals(""); // zone has root label 0N/A // assert (zone.size() == (depth() + 1)); // +1 due to root label 0N/A // Ignore resource records whose names aren't within the zone's 0N/A // domain. Also skip records of the zone's top node, since 0N/A // the zone's root NameNode is already in place. 0N/A // The zone's SOA record is the first record in the answer section. 0N/A synchronized (
this) {
0N/A * Set this zone's data to expire in <tt>secsToExpiration</tt> seconds. 0N/A * Returns an SOA record's minimum TTL field. 0N/A * Compares this zone's serial number with that of an SOA record. 0N/A * Zone must be populated. 0N/A * Returns a negative, zero, or positive integer as this zone's 0N/A * serial number is less than, equal to, or greater than the SOA 0N/A * See ResourceRecord.compareSerialNumbers() for a description of 0N/A * serial number arithmetic. 0N/A // assert isPopulated(); 0N/A * Returns an SOA record's serial number. 0N/A // An SOA record ends with: serial refresh retry expire minimum. 0N/A // Set "beg" to the space before serial, and "end" to the space after. 0N/A // We go "backward" to avoid dealing with escaped spaces in names. 0N/A for (
int i =
0; i <
5; i++) {