public synchronized final void handle(final NodeDescriptorProto node) { final String rack_name = (node.hasRackName() ? node.getRackName() : DEFAULT_RACK); LOG.log(Level.FINEST, "Catalog new node: id[{0}], rack[{1}], host[{2}], port[{3}], memory[{4}]", new Object[]{node.getIdentifier(), rack_name, node.getHostName(), node.getPort(), node.getMemorySize()} ); if (!this.racks.containsKey(rack_name)) { final RackDescriptorImpl rack = new RackDescriptorImpl(rack_name); this.racks.put(rack_name, rack); } final RackDescriptorImpl rack = this.racks.get(rack_name); final InetSocketAddress address = new InetSocketAddress(node.getHostName(), node.getPort()); final NodeDescriptorImpl nodeDescriptor = new NodeDescriptorImpl(node.getIdentifier(), address, rack, node.getMemorySize()); this.nodes.put(nodeDescriptor.getId(), nodeDescriptor); } }
if (hasIdentifier()) { hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getIdentifier().hashCode();
result = result && (hasIdentifier() == other.hasIdentifier()); if (hasIdentifier()) { result = result && getIdentifier() .equals(other.getIdentifier());
/** * <code>required string identifier = 1;</code> */ public Builder clearIdentifier() { bitField0_ = (bitField0_ & ~0x00000001); identifier_ = getDefaultInstance().getIdentifier(); onChanged(); return this; } /**