Class PhysicalServer
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,PhysicalServer>
com.aoindustries.aoserv.client.CachedObject<Integer,PhysicalServer>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<PhysicalServer>
com.aoindustries.aoserv.client.infrastructure.PhysicalServer
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
PhysicalServer>
A
PhysicalServer
consumes space and electricity in a rack
and provides resources.- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
Fields inherited from class com.aoindustries.aoserv.client.AoservObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getColumnImpl
(int i) getHost()
float
Gets the maximum electricity current orFloat.NaN
if not known.int
Gets the total number of processor cores or-1
if not applicable, different hyperthreads are counted as separate cores.int
Gets the processor speed in MHz or-1
if not applicable.Gets the processor type ornull
if not applicable.getRack()
Gets the rack this server is part of ornull
if not in a rack.short
Gets the number of rack units used by this server or-1
if unknown or not applicable.int
getRam()
Gets the number of megabytes of RAM in this server or-1
if not applicable.Gets if this supports HVM ornull
if not applicable.Gets the UPS type powering this server.void
Initializes this object from the raw database contents.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) AoservObject.toString()
implementation that is allowed to throw exceptions.void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
Methods inherited from class com.aoindustries.aoserv.client.AoservObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxId, getLinuxUserName, getMacAddress, getMysqlDatabaseName, getMysqlServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
Constructor Details
-
PhysicalServer
Deprecated, for removal: This API element is subject to removal in a future version.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
PhysicalServer>
-
getHost
- Throws:
SQLException
IOException
-
getRack
Gets the rack this server is part of ornull
if not in a rack.- Throws:
SQLException
IOException
-
getRackUnits
public short getRackUnits()Gets the number of rack units used by this server or-1
if unknown or not applicable. -
getRam
public int getRam()Gets the number of megabytes of RAM in this server or-1
if not applicable. -
getProcessorType
Gets the processor type ornull
if not applicable.- Throws:
SQLException
IOException
-
getProcessorSpeed
public int getProcessorSpeed()Gets the processor speed in MHz or-1
if not applicable. -
getProcessorCores
public int getProcessorCores()Gets the total number of processor cores or-1
if not applicable, different hyperthreads are counted as separate cores. -
getMaxPower
public float getMaxPower()Gets the maximum electricity current orFloat.NaN
if not known. -
getSupportsHvm
Gets if this supports HVM ornull
if not applicable. -
getUpsType
Gets the UPS type powering this server. -
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
PhysicalServer>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
PhysicalServer> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
PhysicalServer> - Throws:
IOException
-
toStringImpl
Description copied from class:AoservObject
AoservObject.toString()
implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAoservObject.toString()
on the key (fromAoservObject.getKey()
). When the key isnull
, uses the default implementation fromObject.toString()
.- Overrides:
toStringImpl
in classCachedObjectIntegerKey<PhysicalServer>
- Throws:
SQLException
IOException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
PhysicalServer> - Throws:
IOException
-