Package net.i2p.router.sybil
Class Analysis
- java.lang.Object
-
- net.i2p.router.JobImpl
-
- net.i2p.router.sybil.Analysis
-
-
Field Summary
Fields Modifier and Type Field Description static String
APP_NAME
The name we register with the ClientAppManagerstatic boolean
DEFAULT_BLOCK
static double
DEFAULT_BLOCK_THRESHOLD
static long
DEFAULT_BLOCK_TIME
static long
DEFAULT_FREQUENCY
static long
DEFAULT_REMOVE_TIME
static int
MAX
static float
MIN_BLOCK_POINTS
static double
MIN_CLOSE
static int
PAIRMAX
static String
PROP_BLOCK
static String
PROP_BLOCKTIME
static String
PROP_FREQUENCY
static String
PROP_NONFF
static String
PROP_REMOVETIME
static String
PROP_THRESHOLD
static long
SHORT_REMOVE_TIME
-
Method Summary
-
Methods inherited from class net.i2p.router.JobImpl
dropped, getAddedBy, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toString
-
-
-
-
Field Detail
-
APP_NAME
public static final String APP_NAME
The name we register with the ClientAppManager- See Also:
- Constant Field Values
-
PROP_FREQUENCY
public static final String PROP_FREQUENCY
- See Also:
- Constant Field Values
-
PROP_THRESHOLD
public static final String PROP_THRESHOLD
- See Also:
- Constant Field Values
-
PROP_BLOCK
public static final String PROP_BLOCK
- See Also:
- Constant Field Values
-
PROP_NONFF
public static final String PROP_NONFF
- See Also:
- Constant Field Values
-
PROP_BLOCKTIME
public static final String PROP_BLOCKTIME
- See Also:
- Constant Field Values
-
PROP_REMOVETIME
public static final String PROP_REMOVETIME
- See Also:
- Constant Field Values
-
PAIRMAX
public static final int PAIRMAX
- See Also:
- Constant Field Values
-
MAX
public static final int MAX
- See Also:
- Constant Field Values
-
MIN_CLOSE
public static final double MIN_CLOSE
- See Also:
- Constant Field Values
-
DEFAULT_BLOCK
public static final boolean DEFAULT_BLOCK
- See Also:
- Constant Field Values
-
DEFAULT_BLOCK_THRESHOLD
public static final double DEFAULT_BLOCK_THRESHOLD
- See Also:
- Constant Field Values
-
DEFAULT_BLOCK_TIME
public static final long DEFAULT_BLOCK_TIME
- See Also:
- Constant Field Values
-
DEFAULT_REMOVE_TIME
public static final long DEFAULT_REMOVE_TIME
- See Also:
- Constant Field Values
-
SHORT_REMOVE_TIME
public static final long SHORT_REMOVE_TIME
- See Also:
- Constant Field Values
-
DEFAULT_FREQUENCY
public static final long DEFAULT_FREQUENCY
- See Also:
- Constant Field Values
-
MIN_BLOCK_POINTS
public static final float MIN_BLOCK_POINTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static Analysis getInstance(RouterContext ctx)
- Returns:
- non-null, creates new if not already registered
-
getPersister
public PersistSybil getPersister()
-
runJob
public void runJob()
Description copied from interface:Job
Actually perform the task. This call blocks until the Job is complete.
-
shutdown
public void shutdown(String[] args)
ClientApp interface
-
getState
public ClientAppState getState()
Description copied from interface:ClientApp
The current state of the ClientApp.
-
getName
public String getName()
Description copied from interface:ClientApp
The generic name of the ClientApp, used for registration, e.g. "console". Do not translate.
-
getDisplayName
public String 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
public List<RouterInfo> getFloodfills(Hash us)
All the floodfills, not including us- Since:
- 0.9.38 split out from renderRouterInfoHTML
-
getAllRouters
public List<RouterInfo> getAllRouters(Hash us)
All the routers, not including us- Since:
- 0.9.41
-
getAvgMinDist
public double getAvgMinDist(List<RouterInfo> ris)
-
backgroundAnalysis
public Map<Hash,Points> backgroundAnalysis(boolean includeAll)
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)
- Since:
- 0.9.38 split out from renderIPGroupsFamily()
-
addProfilePoints
public void addProfilePoints(List<RouterInfo> ris, Map<Hash,Points> points)
-
addVersionPoints
public void addVersionPoints(List<RouterInfo> ris, Map<Hash,Points> points)
-
-