mirror of https://github.com/apache/jclouds.git
Fixed pluralization, Javadoc, Nullable, and static import stuff.
This commit is contained in:
parent
789fc2c79e
commit
f30bd94cbe
|
@ -168,7 +168,7 @@ public class CreateLoadBalancer extends BaseLoadBalancer<AddNode, CreateLoadBala
|
|||
*/
|
||||
@Override
|
||||
public Builder nodes(Iterable<AddNode> addNodes) {
|
||||
this.nodes = ImmutableSet.<AddNode> copyOf(checkNotNull(addNodes, "nodes"));
|
||||
this.nodes = ImmutableSet.<AddNode> copyOf(checkNotNull(addNodes, "addNodes"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -176,8 +176,8 @@ public class CreateLoadBalancer extends BaseLoadBalancer<AddNode, CreateLoadBala
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder node(AddNode nodes) {
|
||||
this.nodes.add(checkNotNull(nodes, "nodes"));
|
||||
public Builder node(AddNode node) {
|
||||
this.nodes.add(checkNotNull(node, "node"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ package org.jclouds.rackspace.cloudloadbalancers.v1.domain;
|
|||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ForwardingMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import static com.google.common.collect.Maps.newHashMap;
|
||||
import static com.google.common.collect.Sets.newHashSet;
|
||||
|
||||
/**
|
||||
* Key and value must be 256 characters or less. All UTF-8 characters are valid.
|
||||
|
@ -32,8 +32,8 @@ import com.google.common.collect.Sets;
|
|||
* @author Everett Toews
|
||||
*/
|
||||
public class Metadata extends ForwardingMap<String, String> {
|
||||
private final Map<String, String> metadata = Maps.newHashMap();
|
||||
private final Map<String, Integer> keyToId = Maps.newHashMap();
|
||||
private final Map<String, String> metadata = newHashMap();
|
||||
private final Map<String, Integer> keyToId = newHashMap();
|
||||
|
||||
public Metadata(Metadata metadata) {
|
||||
super();
|
||||
|
@ -58,6 +58,6 @@ public class Metadata extends ForwardingMap<String, String> {
|
|||
}
|
||||
|
||||
public Iterable<Integer> getIds() {
|
||||
return Sets.newHashSet(keyToId.values());
|
||||
return newHashSet(keyToId.values());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.rackspace.cloudloadbalancers.v1.domain;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseLoadBalancer;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseLoadBalancer.Algorithm;
|
||||
|
||||
|
@ -36,9 +37,9 @@ public class UpdateLoadBalancer {
|
|||
private final Algorithm algorithm;
|
||||
private final Integer timeout;
|
||||
private final Boolean halfClosed;
|
||||
|
||||
protected UpdateLoadBalancer(String name, String protocol, Integer port, Algorithm algorithm, Integer timeout,
|
||||
Boolean halfClosed) {
|
||||
|
||||
protected UpdateLoadBalancer(@Nullable String name, @Nullable String protocol, @Nullable Integer port,
|
||||
@Nullable Algorithm algorithm, @Nullable Integer timeout, @Nullable Boolean halfClosed) {
|
||||
this.name = name;
|
||||
this.protocol = protocol;
|
||||
this.port = port;
|
||||
|
@ -154,7 +155,7 @@ public class UpdateLoadBalancer {
|
|||
this.halfClosed = halfClosed;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public UpdateLoadBalancer build() {
|
||||
return new UpdateLoadBalancer(name, protocol, port, algorithm, timeout, halfClosed);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.rackspace.cloudloadbalancers.v1.domain;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseNode;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseNode.Condition;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.internal.BaseNode.Type;
|
||||
|
@ -35,7 +36,7 @@ public class UpdateNode {
|
|||
private final Type type;
|
||||
private final Integer weight;
|
||||
|
||||
protected UpdateNode(Condition condition, Type type, Integer weight) {
|
||||
protected UpdateNode(@Nullable Condition condition, @Nullable Type type, @Nullable Integer weight) {
|
||||
this.condition = condition;
|
||||
this.type = type;
|
||||
this.weight = weight;
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.jclouds.rackspace.cloudloadbalancers.v1.domain.ConnectionThrottle;
|
|||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.HealthMonitor;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.LoadBalancer;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.domain.SessionPersistence;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.features.LoadBalancerApi;
|
||||
import org.jclouds.rackspace.cloudloadbalancers.v1.features.ReportApi;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
@ -261,7 +261,7 @@ public class BaseLoadBalancer<N extends BaseNode<N>, T extends BaseLoadBalancer<
|
|||
/**
|
||||
* Required. Protocol of the service which is being load balanced.
|
||||
*
|
||||
* @see LoadBalancerApi#listProtocols()
|
||||
* @see ReportApi#listProtocols()
|
||||
*/
|
||||
public Builder<N, T> protocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
|
@ -269,8 +269,8 @@ public class BaseLoadBalancer<N extends BaseNode<N>, T extends BaseLoadBalancer<
|
|||
}
|
||||
|
||||
/**
|
||||
* Required if the protocol being used is not in LoadBalancerApi#listProtocols() or the protocol is in
|
||||
* LoadBalancerApi#listProtocols() but port=0. Port number for the service you are load balancing.
|
||||
* Required if the protocol being used is not in {@link ReportApi#listProtocols()} or the protocol is in
|
||||
* {@link ReportApi#listProtocols()} but port=0. Port number for the service you are load balancing.
|
||||
*/
|
||||
public Builder<N, T> port(@Nullable Integer port) {
|
||||
this.port = port;
|
||||
|
|
Loading…
Reference in New Issue