001/* 002 * Copyright 2013 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.runtime.plugins.admin.jvmstatus.monitoring.sample; 017 018import java.util.Map; 019 020/** 021 * Interface providing access to disk I/O statistics. 022 */ 023public interface DiskIOMonitor 024{ 025 026 /** Read operations count. */ 027 public static final String READS = "reads"; 028 /** Bytes read count. */ 029 public static final String READ_BYTES = "read_bytes"; 030 /** Write operations count. */ 031 public static final String WRITES = "writes"; 032 /** Bytes written count. */ 033 public static final String WRITE_BYTES = "write_bytes"; 034 035 /** Internally refresh the data. */ 036 void refresh(); 037 038 /** 039 * Get the read operation count. 040 * @return the read operation count. 041 */ 042 double getReads(); 043 044 /** 045 * Get the byte read count. 046 * @return the byte read count. 047 */ 048 double getReadBytes(); 049 050 /** 051 * Get the write operation count. 052 * @return the write operation count. 053 */ 054 double getWrites(); 055 056 /** 057 * Get the byte written count. 058 * @return the byte written count. 059 */ 060 double getWriteBytes(); 061 062 /** 063 * Return all the data as a Map. 064 * @return the data as a Map. 065 */ 066 Map<String, Double> toMap(); 067 068}