Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information 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 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 specific language governing permissions and limitations under the License.
 
 package org.jclouds.cloudsigma.domain;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 
 import java.util.Map;
 

Author(s):
Adrian Cole
 
 public class ServerMetrics {
 
    public static class Builder {
       protected long txPackets;
       protected long tx;
       protected long rxPackets;
       protected long rx;
       protected Map<StringDriveMetricsdriveMetrics = ImmutableMap.<StringDriveMetricsof();
 
       public Builder txPackets(long txPackets) {
          this. = txPackets;
          return this;
       }
 
       public Builder tx(long tx) {
          this. = tx;
          return this;
       }
 
       public Builder rxPackets(long rxPackets) {
          this. = rxPackets;
          return this;
       }
 
       public Builder rx(long rx) {
          this. = rx;
          return this;
       }
 
       public Builder driveMetrics(Map<String, ? extends DriveMetricsdriveMetrics) {
          this. = ImmutableMap.copyOf(checkNotNull(driveMetrics"driveMetrics"));
          return this;
       }
 
       public ServerMetrics build() {
          return new ServerMetrics();
       }
    }
 
    protected final long txPackets;
    protected final long tx;
    protected final long rxPackets;
    protected final long rx;
    protected final Map<StringDriveMetricsdriveMetrics;
 
    public ServerMetrics(long txlong txPacketslong rxlong rxPacketsMap<StringDriveMetricsdriveMetrics) {
       this. = txPackets;
       this. = tx;
       this. = rxPackets;
       this. = rx;
       this. = ImmutableMap.copyOf(checkNotNull(driveMetrics"driveMetrics"));
    }
 
    // TODO undocumented
    public long getTxPackets() {
       return ;
    }
 
    // TODO undocumented
    public long getTx() {
       return ;
    }
 
    // TODO undocumented
    public long getRxPackets() {
       return ;
    }
 
    // TODO undocumented
   public long getRx() {
      return ;
   }

   

Returns:
metrics keyed on device id ex. ide:0:0
   public Map<StringDriveMetricsgetDriveMetrics() {
      return ;
   }
   public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + (( == null) ? 0 : .hashCode());
      result = prime * result + (int) ( ^ ( >>> 32));
      result = prime * result + (int) ( ^ ( >>> 32));
      result = prime * result + (int) ( ^ ( >>> 32));
      result = prime * result + (int) ( ^ ( >>> 32));
      return result;
   }
   public boolean equals(Object obj) {
      if (this == obj)
         return true;
      if (obj == null)
         return false;
      if (getClass() != obj.getClass())
         return false;
      ServerMetrics other = (ServerMetricsobj;
      if ( == null) {
         if (other.driveMetrics != null)
            return false;
      } else if (!.equals(other.driveMetrics))
         return false;
      if ( != other.rx)
         return false;
      if ( != other.rxPackets)
         return false;
      if ( != other.tx)
         return false;
      if ( != other.txPackets)
         return false;
      return true;
   }
   public String toString() {
      return "[ txPackets=" +  + ", tx=" +  + ", rxPackets=" +  + ", rx=" +  + ", driveMetrics="
            +  + "]";
   }
New to GrepCode? Check out our FAQ X