Class Set
java.lang.Object
com.aoindustries.aoserv.client.AoservObject<Integer,Set>
com.aoindustries.aoserv.client.CachedObject<Integer,Set>
com.aoindustries.aoserv.client.CachedObjectIntegerKey<Set>
com.aoindustries.aoserv.client.net.reputation.Set
- All Implemented Interfaces:
Streamable
,StreamReadable
,StreamWritable
,Row
,AoservReadable
,AoservStreamable
,AoservWritable
,SingleTableObject<Integer,
Set>
An
IpReputationSet
stores network and host IP reputation fed
from external sources.- Author:
- AO Industries, Inc.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static enum
static enum
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addReputation
(int host, Set.ConfidenceType confidence, Set.ReputationType reputationType, short score) void
addReputation
(Collection<Set.AddReputation> addReputations) May be filtered.boolean
Allows sub accounts to use this set.protected Object
getColumnImpl
(int i) int
Gets the number of seconds between each host reputation decay.getHosts()
Gets the system-wide unique identifier for this reputation set.Gets the last time the hosts were decayed.Gets the last time the networks were decayed.Gets the last time reputation was added.short
Gets the maximum definite reputation score for a host.int
Gets the maximum number of individual hosts that will be tracked.short
Gets the maximum reputation score for a network.short
Gets the maximum uncertain reputation score for a host.int
Gets the number of seconds between each network reputation decay.short
Gets the network prefix size, such as 24 for a /24 (class C) network.void
Initializes this object from the raw database contents.void
read
(StreamableInput in, AoservProtocol.Version protocolVersion) void
write
(StreamableOutput out, AoservProtocol.Version protocolVersion) Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
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
-
Set
Deprecated.Only required for implementation, do not use directly.- See Also:
-
-
Method Details
-
getTableId
- Specified by:
getTableId
in classAoservObject<Integer,
Set>
-
init
Description copied from class:AoservObject
Initializes this object from the raw database contents.- Specified by:
init
in classAoservObject<Integer,
Set> - Parameters:
result
- theResultSet
containing the row to copy into this object- Throws:
SQLException
-
write
- Specified by:
write
in interfaceAoservStreamable
- Specified by:
write
in interfaceAoservWritable
- Specified by:
write
in classAoservObject<Integer,
Set> - Throws:
IOException
-
read
- Specified by:
read
in interfaceAoservReadable
- Specified by:
read
in interfaceAoservStreamable
- Specified by:
read
in classAoservObject<Integer,
Set> - Throws:
IOException
-
getColumnImpl
- Specified by:
getColumnImpl
in classAoservObject<Integer,
Set>
-
getAccount_name
-
getAccount
May be filtered.- Throws:
SQLException
IOException
-
getIdentifier
Gets the system-wide unique identifier for this reputation set. -
getAllowSubaccountUse
public boolean getAllowSubaccountUse()Allows sub accounts to use this set. They cannot see the set hosts and networks. -
getMaxHosts
public int getMaxHosts()Gets the maximum number of individual hosts that will be tracked. -
getMaxUncertainReputation
public short getMaxUncertainReputation()Gets the maximum uncertain reputation score for a host. -
getMaxDefiniteReputation
public short getMaxDefiniteReputation()Gets the maximum definite reputation score for a host. -
getNetworkPrefix
public short getNetworkPrefix()Gets the network prefix size, such as 24 for a /24 (class C) network. -
getMaxNetworkReputation
public short getMaxNetworkReputation()Gets the maximum reputation score for a network. -
getHostDecayInterval
public int getHostDecayInterval()Gets the number of seconds between each host reputation decay. -
getLastHostDecay
Gets the last time the hosts were decayed. -
getNetworkDecayInterval
public int getNetworkDecayInterval()Gets the number of seconds between each network reputation decay. -
getLastNetworkDecay
Gets the last time the networks were decayed. -
getLastReputationAdded
Gets the last time reputation was added. -
getHosts
- Throws:
IOException
SQLException
-
getNetworks
- Throws:
IOException
SQLException
-
addReputation
public void addReputation(int host, Set.ConfidenceType confidence, Set.ReputationType reputationType, short score) throws IOException, SQLException - Throws:
IOException
SQLException
-
addReputation
public void addReputation(Collection<Set.AddReputation> addReputations) throws IOException, SQLException - Throws:
IOException
SQLException
-