Remove redundant modifiers from interfaces (#14843)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2023-04-18 13:07:04 +02:00
committed by GitHub
parent 24adc5aa12
commit 83cbe746d0
174 changed files with 806 additions and 774 deletions

View File

@@ -38,89 +38,93 @@ public interface SysteminfoInterface {
/**
* Initialize logic for the Systeminfo implementation
*/
public void initializeSysteminfo();
void initializeSysteminfo();
// Operating system info
/**
* Get the Family of the operating system /e.g. Windows,Unix,.../
*/
public StringType getOsFamily();
StringType getOsFamily();
/**
* Get the manufacturer of the operating system
*/
public StringType getOsManufacturer();
StringType getOsManufacturer();
/**
* Get the version of the operating system
*
* @return
*/
public StringType getOsVersion();
StringType getOsVersion();
// CPU info
/**
* Get the name of the CPU
*/
public StringType getCpuName();
StringType getCpuName();
/**
* Get description about the CPU e.g (model, family, vendor, serial number, identifier, architecture(32bit or
* 64bit))
*/
public StringType getCpuDescription();
StringType getCpuDescription();
/**
* Get the number of logical CPUs/cores available for processing.
*/
public DecimalType getCpuLogicalCores();
DecimalType getCpuLogicalCores();
/**
* Get the number of physical CPUs/cores available for processing.
*/
public DecimalType getCpuPhysicalCores();
DecimalType getCpuPhysicalCores();
/**
* Returns the system cpu load.
*
* @return the system cpu load between 0 and 100% or null, if no information is available
*/
public @Nullable PercentType getSystemCpuLoad();
@Nullable
PercentType getSystemCpuLoad();
/**
* Returns the system load average for the last minute.
*
* @return the load as a number of processes or null, if no information is available
*/
public @Nullable DecimalType getCpuLoad1();
@Nullable
DecimalType getCpuLoad1();
/**
* Returns the system load average for the last 5 minutes.
*
* @return the load as number of processes or null, if no information is available
*/
public @Nullable DecimalType getCpuLoad5();
@Nullable
DecimalType getCpuLoad5();
/**
* Returns the system load average for the last 15 minutes.
*
* @return the load as number of processes or null, if no information is available
*/
public @Nullable DecimalType getCpuLoad15();
@Nullable
DecimalType getCpuLoad15();
/**
* Get the System uptime (time since boot).
*
* @return time since boot
*/
public QuantityType<Time> getCpuUptime();
QuantityType<Time> getCpuUptime();
/**
* Get the number of threads currently running
*
* @return number of threads
*/
public DecimalType getCpuThreads();
DecimalType getCpuThreads();
// Memory info
/**
@@ -128,35 +132,37 @@ public interface SysteminfoInterface {
*
* @return memory size
*/
public QuantityType<DataAmount> getMemoryTotal();
QuantityType<DataAmount> getMemoryTotal();
/**
* Returns available size of memory
*
* @return memory size
*/
public QuantityType<DataAmount> getMemoryAvailable();
QuantityType<DataAmount> getMemoryAvailable();
/**
* Returns used size of memory
*
* @return memory size
*/
public QuantityType<DataAmount> getMemoryUsed();
QuantityType<DataAmount> getMemoryUsed();
/**
* Percents of available memory on the machine
*
* @return percent of available memory or null, if no information is available
*/
public @Nullable PercentType getMemoryAvailablePercent();
@Nullable
PercentType getMemoryAvailablePercent();
/**
* Percents of used memory on the machine
*
* @return percent of used memory or null, if no information is available
*/
public @Nullable PercentType getMemoryUsedPercent();
@Nullable
PercentType getMemoryUsedPercent();
// Swap memory info
/**
@@ -164,35 +170,37 @@ public interface SysteminfoInterface {
*
* @return memory size or 0, if there is no swap memory
*/
public QuantityType<DataAmount> getSwapTotal();
QuantityType<DataAmount> getSwapTotal();
/**
* Returns available size swap of memory
*
* @return memory size or 0, if no there is no swap memory
*/
public QuantityType<DataAmount> getSwapAvailable();
QuantityType<DataAmount> getSwapAvailable();
/**
* Returns used size of swap memory
*
* @return memory size or 0, if no there is no swap memory
*/
public QuantityType<DataAmount> getSwapUsed();
QuantityType<DataAmount> getSwapUsed();
/**
* Percents of available swap memory on the machine
*
* @return percent of available memory or null, if no there is no swap memory
*/
public @Nullable PercentType getSwapAvailablePercent();
@Nullable
PercentType getSwapAvailablePercent();
/**
* Percents of used swap memory on the machine
*
* @return percent of used memory or null, if no there is no swap memory
*/
public @Nullable PercentType getSwapUsedPercent();
@Nullable
PercentType getSwapUsedPercent();
// Storage info
/**
@@ -202,7 +210,7 @@ public interface SysteminfoInterface {
* @return storage size
* @throws DeviceNotFoundException
*/
public QuantityType<DataAmount> getStorageTotal(int deviceIndex) throws DeviceNotFoundException;
QuantityType<DataAmount> getStorageTotal(int deviceIndex) throws DeviceNotFoundException;
/**
* Returns the available storage space on the logical storage volume
@@ -211,7 +219,7 @@ public interface SysteminfoInterface {
* @return storage size
* @throws DeviceNotFoundException
*/
public QuantityType<DataAmount> getStorageAvailable(int deviceIndex) throws DeviceNotFoundException;
QuantityType<DataAmount> getStorageAvailable(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the used storage space on the logical storage volume
@@ -220,7 +228,7 @@ public interface SysteminfoInterface {
* @return storage size
* @throws DeviceNotFoundException
*/
public QuantityType<DataAmount> getStorageUsed(int deviceIndex) throws DeviceNotFoundException;
QuantityType<DataAmount> getStorageUsed(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the percent of available storage on the logical volume
@@ -229,7 +237,8 @@ public interface SysteminfoInterface {
* @return percent of available storage or null
* @throws DeviceNotFoundException
*/
public @Nullable PercentType getStorageAvailablePercent(int deviceIndex) throws DeviceNotFoundException;
@Nullable
PercentType getStorageAvailablePercent(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the percent of used storage on the logical volume
@@ -238,28 +247,29 @@ public interface SysteminfoInterface {
* @return percent of used storage or null
* @throws DeviceNotFoundException
*/
public @Nullable PercentType getStorageUsedPercent(int deviceIndex) throws DeviceNotFoundException;
@Nullable
PercentType getStorageUsedPercent(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the name of the logical storage volume
*
* @throws DeviceNotFoundException
*/
public StringType getStorageName(int deviceIndex) throws DeviceNotFoundException;
StringType getStorageName(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the type of the logical storage volume (e.g. NTFS, FAT32)
*
* @throws DeviceNotFoundException
*/
public StringType getStorageType(int deviceIndex) throws DeviceNotFoundException;
StringType getStorageType(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the description of the logical storage volume
*
* @throws DeviceNotFoundException
*/
public StringType getStorageDescription(int deviceIndex) throws DeviceNotFoundException;
StringType getStorageDescription(int deviceIndex) throws DeviceNotFoundException;
// Hardware drive info
/**
@@ -268,7 +278,7 @@ public interface SysteminfoInterface {
* @param deviceIndex - index of the storage drive
* @throws DeviceNotFoundException
*/
public StringType getDriveName(int deviceIndex) throws DeviceNotFoundException;
StringType getDriveName(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the model of the physical storage drive
@@ -276,7 +286,7 @@ public interface SysteminfoInterface {
* @param deviceIndex - index of the storage drive
* @throws DeviceNotFoundException
*/
public StringType getDriveModel(int deviceIndex) throws DeviceNotFoundException;
StringType getDriveModel(int deviceIndex) throws DeviceNotFoundException;
/**
* Gets the serial number of the physical storage drive
@@ -284,7 +294,7 @@ public interface SysteminfoInterface {
* @param deviceIndex - index of the storage drive
* @throws DeviceNotFoundException
*/
public StringType getDriveSerialNumber(int deviceIndex) throws DeviceNotFoundException;
StringType getDriveSerialNumber(int deviceIndex) throws DeviceNotFoundException;
// Network info
/**
@@ -294,7 +304,7 @@ public interface SysteminfoInterface {
* @return 32-bit IPv4 address
* @throws DeviceNotFoundException
*/
public StringType getNetworkIp(int networkIndex) throws DeviceNotFoundException;
StringType getNetworkIp(int networkIndex) throws DeviceNotFoundException;
/**
* Get the name of this network.
@@ -302,7 +312,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public StringType getNetworkName(int networkIndex) throws DeviceNotFoundException;
StringType getNetworkName(int networkIndex) throws DeviceNotFoundException;
/**
* The description of the network. On some platforms, this is identical to the name.
@@ -310,7 +320,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public StringType getNetworkDisplayName(int networkIndex) throws DeviceNotFoundException;
StringType getNetworkDisplayName(int networkIndex) throws DeviceNotFoundException;
/**
* Gets the MAC Address of the network.
@@ -318,7 +328,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public StringType getNetworkMac(int networkIndex) throws DeviceNotFoundException;
StringType getNetworkMac(int networkIndex) throws DeviceNotFoundException;
/**
* Get number of packets received
@@ -326,7 +336,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public DecimalType getNetworkPacketsReceived(int networkIndex) throws DeviceNotFoundException;
DecimalType getNetworkPacketsReceived(int networkIndex) throws DeviceNotFoundException;
/**
* Get number of packets sent
@@ -334,7 +344,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public DecimalType getNetworkPacketsSent(int networkIndex) throws DeviceNotFoundException;
DecimalType getNetworkPacketsSent(int networkIndex) throws DeviceNotFoundException;
/**
* Get data sent for this network
@@ -342,7 +352,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public QuantityType<DataAmount> getNetworkDataSent(int networkIndex) throws DeviceNotFoundException;
QuantityType<DataAmount> getNetworkDataSent(int networkIndex) throws DeviceNotFoundException;
/**
* Get data received for this network
@@ -350,7 +360,7 @@ public interface SysteminfoInterface {
* @param networkIndex - the index of the network
* @throws DeviceNotFoundException
*/
public QuantityType<DataAmount> getNetworkDataReceived(int networkIndex) throws DeviceNotFoundException;
QuantityType<DataAmount> getNetworkDataReceived(int networkIndex) throws DeviceNotFoundException;
// Display info
/**
@@ -359,7 +369,7 @@ public interface SysteminfoInterface {
* @param deviceIndex - the index of the display device
* @throws DeviceNotFoundException
*/
public StringType getDisplayInformation(int deviceIndex) throws DeviceNotFoundException;
StringType getDisplayInformation(int deviceIndex) throws DeviceNotFoundException;
// Sensors info
/**
@@ -367,14 +377,16 @@ public interface SysteminfoInterface {
*
* @return Temperature if available, null otherwise.
*/
public @Nullable QuantityType<Temperature> getSensorsCpuTemperature();
@Nullable
QuantityType<Temperature> getSensorsCpuTemperature();
/**
* Get the information for the CPU voltage.
*
* @return Voltage if available, null otherwise.
*/
public @Nullable QuantityType<ElectricPotential> getSensorsCpuVoltage();
@Nullable
QuantityType<ElectricPotential> getSensorsCpuVoltage();
/**
* Get fan speed
@@ -383,7 +395,8 @@ public interface SysteminfoInterface {
* @return Speed in rpm or null if unable to measure fan speed
* @throws DeviceNotFoundException
*/
public @Nullable DecimalType getSensorsFanSpeed(int deviceIndex) throws DeviceNotFoundException;
@Nullable
DecimalType getSensorsFanSpeed(int deviceIndex) throws DeviceNotFoundException;
// Battery info
/**
@@ -393,7 +406,8 @@ public interface SysteminfoInterface {
* @return duration remaining charge or null, if the time is estimated as unlimited
* @throws DeviceNotFoundException
*/
public @Nullable QuantityType<Time> getBatteryRemainingTime(int deviceIndex) throws DeviceNotFoundException;
@Nullable
QuantityType<Time> getBatteryRemainingTime(int deviceIndex) throws DeviceNotFoundException;
/**
* Battery remaining capacity.
@@ -402,7 +416,7 @@ public interface SysteminfoInterface {
* @return percentage value
* @throws DeviceNotFoundException
*/
public PercentType getBatteryRemainingCapacity(int deviceIndex) throws DeviceNotFoundException;
PercentType getBatteryRemainingCapacity(int deviceIndex) throws DeviceNotFoundException;
/**
* Get battery name
@@ -410,7 +424,7 @@ public interface SysteminfoInterface {
* @param deviceIndex
* @throws DeviceNotFoundException
*/
public StringType getBatteryName(int deviceIndex) throws DeviceNotFoundException;
StringType getBatteryName(int deviceIndex) throws DeviceNotFoundException;
/**
* Get PID of process executing this code
@@ -425,7 +439,8 @@ public interface SysteminfoInterface {
* @param pid - the PID of the process
* @throws DeviceNotFoundException - thrown if process with this PID can not be found
*/
public @Nullable StringType getProcessName(int pid) throws DeviceNotFoundException;
@Nullable
StringType getProcessName(int pid) throws DeviceNotFoundException;
/**
* Returns the CPU usage of the process
@@ -434,7 +449,8 @@ public interface SysteminfoInterface {
* @return - percentage value, can be above 100% if process uses multiple cores
* @throws DeviceNotFoundException - thrown if process with this PID can not be found
*/
public @Nullable DecimalType getProcessCpuUsage(int pid) throws DeviceNotFoundException;
@Nullable
DecimalType getProcessCpuUsage(int pid) throws DeviceNotFoundException;
/**
* Returns the size of RAM memory only usage of the process
@@ -443,7 +459,8 @@ public interface SysteminfoInterface {
* @return memory size
* @throws DeviceNotFoundException- thrown if process with this PID can not be found
*/
public @Nullable QuantityType<DataAmount> getProcessMemoryUsage(int pid) throws DeviceNotFoundException;
@Nullable
QuantityType<DataAmount> getProcessMemoryUsage(int pid) throws DeviceNotFoundException;
/**
* Returns the full path of the executing process.
@@ -451,7 +468,8 @@ public interface SysteminfoInterface {
* @param pid - the PID of the process
* @throws DeviceNotFoundException - thrown if process with this PID can not be found
*/
public @Nullable StringType getProcessPath(int pid) throws DeviceNotFoundException;
@Nullable
StringType getProcessPath(int pid) throws DeviceNotFoundException;
/**
* Returns the number of threads in this process.
@@ -459,42 +477,43 @@ public interface SysteminfoInterface {
* @param pid - the PID of the process
* @throws DeviceNotFoundException - thrown if process with this PID can not be found
*/
public @Nullable DecimalType getProcessThreads(int pid) throws DeviceNotFoundException;
@Nullable
DecimalType getProcessThreads(int pid) throws DeviceNotFoundException;
/**
* Returns the number of network interfaces.
*
* @return network interface count
*/
public int getNetworkIFCount();
int getNetworkIFCount();
/**
* Returns the number of displays.
*
* @return display count
*/
public int getDisplayCount();
int getDisplayCount();
/**
* Returns the number of storages.
*
* @return storage count
*/
public int getFileOSStoreCount();
int getFileOSStoreCount();
/**
* Returns the number of power sources/batteries.
*
* @return power source count
*/
public int getPowerSourceCount();
int getPowerSourceCount();
/**
* Returns the number of drives.
*
* @return drive count
*/
public int getDriveCount();
int getDriveCount();
/**
* Returns the number of fans.