Package net.i2p.router.sybil
Class Analysis
java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.sybil.Analysis
- Since:
- 0.9.38 split out from SybilRenderer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name we register with the ClientAppManagerstatic final boolean
static final double
static final long
static final long
static final long
static final int
static final float
static final double
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final long
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProfilePoints
(List<RouterInfo> ris, Map<Hash, Points> points) void
addVersionPoints
(List<RouterInfo> ris, Map<Hash, Points> points) backgroundAnalysis
(boolean includeAll) Analyze threats.calculateIPGroups16
(List<RouterInfo> ris, Map<Hash, Points> points) calculateIPGroups24
(List<RouterInfo> ris, Map<Hash, Points> points) calculateIPGroups32
(List<RouterInfo> ris, Map<Hash, Points> points) calculateIPGroupsFamily
(List<RouterInfo> ris, Map<Hash, Points> points) void
calculateIPGroupsUs
(List<RouterInfo> ris, Map<Hash, Points> points, List<RouterInfo> ri32, List<RouterInfo> ri24, List<RouterInfo> ri16) double
calculatePairDistance
(List<RouterInfo> ris, Map<Hash, Points> points, List<Pair> pairs) void
calculateRouterInfo
(Hash us, String usName, List<RouterInfo> ris, Map<Hash, Points> points) getAllRouters
(Hash us) All the routers, not including usdouble
getAvgMinDist
(List<RouterInfo> ris) The display name of the ClientApp, used in user interfaces.getFloodfills
(Hash us) All the floodfills, not including usstatic Analysis
getInstance
(RouterContext ctx) getName()
The generic name of the ClientApp, used for registration, e.g.getState()
The current state of the ClientApp.void
runJob()
Actually perform the task.void
schedule()
void
ClientApp interfacevoid
startup()
ClientApp interfaceMethods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, madeReady, requeue, toString
-
Field Details
-
APP_NAME
The name we register with the ClientAppManager- See Also:
-
PROP_FREQUENCY
- See Also:
-
PROP_THRESHOLD
- See Also:
-
PROP_BLOCK
- See Also:
-
PROP_NONFF
- See Also:
-
PROP_BLOCKTIME
- See Also:
-
PROP_REMOVETIME
- See Also:
-
PAIRMAX
public static final int PAIRMAX- See Also:
-
MAX
public static final int MAX- See Also:
-
MIN_CLOSE
public static final double MIN_CLOSE- See Also:
-
DEFAULT_BLOCK
public static final boolean DEFAULT_BLOCK- See Also:
-
DEFAULT_BLOCK_THRESHOLD
public static final double DEFAULT_BLOCK_THRESHOLD- See Also:
-
DEFAULT_BLOCK_TIME
public static final long DEFAULT_BLOCK_TIME- See Also:
-
DEFAULT_REMOVE_TIME
public static final long DEFAULT_REMOVE_TIME- See Also:
-
SHORT_REMOVE_TIME
public static final long SHORT_REMOVE_TIME- See Also:
-
DEFAULT_FREQUENCY
public static final long DEFAULT_FREQUENCY- See Also:
-
MIN_BLOCK_POINTS
public static final float MIN_BLOCK_POINTS- See Also:
-
-
Method Details
-
getInstance
- Returns:
- non-null, creates new if not already registered
-
getPersister
-
runJob
public void runJob()Description copied from interface:Job
Actually perform the task. This call blocks until the Job is complete. -
startup
public void startup()ClientApp interface -
shutdown
ClientApp interface -
getState
Description copied from interface:ClientApp
The current state of the ClientApp. -
getName
Description copied from interface:ClientApp
The generic name of the ClientApp, used for registration, e.g. "console". Do not translate. -
getDisplayName
Description copied from interface:ClientApp
The display name of the ClientApp, used in user interfaces. The app must translate.- Specified by:
getDisplayName
in interfaceClientApp
- Returns:
- non-null
-
schedule
public void schedule() -
getFloodfills
All the floodfills, not including us- Since:
- 0.9.38 split out from renderRouterInfoHTML
-
getAllRouters
All the routers, not including us- Since:
- 0.9.41
-
getAvgMinDist
-
backgroundAnalysis
Analyze threats. No output. Return separate maps for each cause instead?- Parameters:
includeAll
- false for floodfills only- Since:
- 0.9.38
-
calculatePairDistance
public double calculatePairDistance(List<RouterInfo> ris, Map<Hash, Points> points, List<Pair> pairs) - Parameters:
pairs
- out parameter, sorted- Returns:
- average distance
- Since:
- 0.9.38 split out from renderPairDistance()
-
calculateIPGroupsUs
public void calculateIPGroupsUs(List<RouterInfo> ris, Map<Hash, Points> points, List<RouterInfo> ri32, List<RouterInfo> ri24, List<RouterInfo> ri16) - Parameters:
ri32
- out parameterri24
- out parameterri16
- out parameter- Since:
- 0.9.38 split out from renderIPGroupsUs()
-
calculateIPGroups32
public Map<Integer,List<RouterInfo>> calculateIPGroups32(List<RouterInfo> ris, Map<Hash, Points> points) - Since:
- 0.9.38 split out from renderIPGroups32()
-
calculateIPGroups24
public Map<Integer,List<RouterInfo>> calculateIPGroups24(List<RouterInfo> ris, Map<Hash, Points> points) - Since:
- 0.9.38 split out from renderIPGroups24()
-
calculateIPGroups16
public Map<Integer,List<RouterInfo>> calculateIPGroups16(List<RouterInfo> ris, Map<Hash, Points> points) - Since:
- 0.9.38 split out from renderIPGroups16()
-
calculateIPGroupsFamily
public Map<String,List<RouterInfo>> calculateIPGroupsFamily(List<RouterInfo> ris, Map<Hash, Points> points) - Returns:
- map of family name to list of routers in that family
- Since:
- 0.9.38 split out from renderIPGroupsFamily()
-
addProfilePoints
-
addVersionPoints
-
calculateRouterInfo
public void calculateRouterInfo(Hash us, String usName, List<RouterInfo> ris, Map<Hash, Points> points) - Parameters:
usName
- HTML escapedris
- will be re-sorted in place- Since:
- 0.9.38 split out from renderRouterInfoHTML()
-