1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.car.storagemonitoring; 18 19 import android.car.storagemonitoring.IIoStatsListener; 20 import android.car.storagemonitoring.IoStatsEntry; 21 import android.car.storagemonitoring.IoStats; 22 import android.car.storagemonitoring.WearEstimate; 23 import android.car.storagemonitoring.WearEstimateChange; 24 25 /** @hide */ 26 interface ICarStorageMonitoring { 27 /** 28 * Returns the value of the PRE_EOL register. 29 */ getPreEolIndicatorStatus()30 int getPreEolIndicatorStatus() = 1; 31 32 /** 33 * Returns the current wear estimate indicators. 34 * 35 * @deprecated wear estimate data is unreliable 36 */ getWearEstimate()37 WearEstimate getWearEstimate() = 2; 38 39 /** 40 * Returns the list of all observed wear estimate changes. 41 * 42 * @deprecated wear estimate data is unreliable 43 */ getWearEstimateHistory()44 List<WearEstimateChange> getWearEstimateHistory() = 3; 45 46 /** 47 * Returns I/O stats as collected at service boot time. 48 * 49 * @deprecated use CarWatchdogManager#getResourceOveruseStats(int, int) instead. 50 */ getBootIoStats()51 List<IoStatsEntry> getBootIoStats() = 4; 52 53 /** 54 * Returns total I/O stats as collected from kernel start until the last snapshot. 55 * 56 * @deprecated use CarWatchdogManager#getResourceOveruseStats(int, int) instead. 57 */ getAggregateIoStats()58 List<IoStatsEntry> getAggregateIoStats() = 5; 59 60 /** 61 * Return the I/O stats deltas currently known to the service. 62 * 63 * @deprecated use CarWatchdogManager#getResourceOveruseStats(int, int) instead. 64 */ getIoStatsDeltas()65 List<IoStats> getIoStatsDeltas() = 6; 66 67 /** 68 * Register a new listener to receive new I/O activity deltas as they are generated. 69 * 70 * @deprecated IIoStatsListener is deprecated 71 */ 72 void registerListener(IIoStatsListener listener) = 7; 73 74 /** 75 * Remove a listener registration, terminating delivery of I/O activity deltas to it. 76 * 77 * @deprecated IIoStatsListener is deprecated 78 */ 79 void unregisterListener(IIoStatsListener listener) = 8; 80 81 /** 82 * Returns the approximate amount of bytes written to disk during the previous shutdown. 83 * 84 * @deprecated use CarWatchdogManager#getResourceOveruseStats(int, int) instead. 85 */ getShutdownDiskWriteAmount()86 long getShutdownDiskWriteAmount() = 9; 87 } 88