Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Onionoo
Commits
680118d0
Commit
680118d0
authored
Aug 21, 2018
by
Karsten Loesing
Browse files
Make a couple JavaDoc fixes.
parent
76bd01bf
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/torproject/onionoo/docs/NodeStatus.java
View file @
680118d0
...
...
@@ -29,7 +29,7 @@ import java.util.stream.Collectors;
* are relevant descriptors, consensuses or other documents available.
*
* <p>At the end of each run of the hourly updater, these documents are
* concatenated and written to a single file in
<
code
>
status/summary
</code>
.
* concatenated and written to a single file in
{@
code
status/summary
}
.
* Each line contains a single document.
*
* <p>A new NodeStatus can be created from a string using the
...
...
src/main/java/org/torproject/onionoo/docs/SummaryDocument.java
View file @
680118d0
...
...
@@ -58,7 +58,7 @@ public class SummaryDocument extends Document {
@JsonIgnore
private
transient
String
hashedFingerprint
=
null
;
/** Returns the SHA1-hashed fingerprint, or
<
code
>
null
</code>
if no
/** Returns the SHA1-hashed fingerprint, or
{@
code
null
}
if no
* fingerprint is set. */
public
String
getHashedFingerprint
()
{
if
(
this
.
hashedFingerprint
==
null
&&
this
.
fingerprint
!=
null
)
{
...
...
@@ -75,7 +75,7 @@ public class SummaryDocument extends Document {
@JsonIgnore
private
transient
String
base64Fingerprint
=
null
;
/** Returns the base64-encoded fingerprint, or
<
code
>
null
</code>
if no
/** Returns the base64-encoded fingerprint, or
{@
code
null
}
if no
* fingerprint is set. */
public
String
getBase64Fingerprint
()
{
if
(
this
.
base64Fingerprint
==
null
&&
this
.
fingerprint
!=
null
)
{
...
...
@@ -93,7 +93,7 @@ public class SummaryDocument extends Document {
private
transient
String
[]
fingerprintSortedHexBlocks
=
null
;
/** Returns a sorted array containing blocks of 4 upper-case hex
* characters from the fingerprint, or
<
code
>
null
</code>
if no
* characters from the fingerprint, or
{@
code
null
}
if no
* fingerprint is set. */
public
String
[]
getFingerprintSortedHexBlocks
()
{
if
(
this
.
fingerprintSortedHexBlocks
==
null
&&
this
.
fingerprint
!=
null
)
{
...
...
src/main/java/org/torproject/onionoo/server/NodeIndexer.java
View file @
680118d0
...
...
@@ -61,8 +61,8 @@ public class NodeIndexer implements ServletContextListener, Runnable {
private
Thread
nodeIndexerThread
=
null
;
/** Returns the creation time of the last known node index in
* milliseconds since the epoch, or
<
code
>
-1
</code>
if no node index
* could be retrieved within
<
code
>
timeoutMillis
</code>
milliseconds. */
* milliseconds since the epoch, or
{@
code
-1
}
if no node index
* could be retrieved within
{@
code
timeoutMillis
}
milliseconds. */
public
synchronized
long
getLastIndexed
(
long
timeoutMillis
)
{
if
(
this
.
lastIndexed
==
-
1L
&&
this
.
nodeIndexerThread
!=
null
&&
timeoutMillis
>
0L
)
{
...
...
@@ -77,7 +77,7 @@ public class NodeIndexer implements ServletContextListener, Runnable {
}
/** Returns the last known node index, or null if no node index could be
* retrieved within
<
code
>
timeoutMillis
</code>
milliseconds. */
* retrieved within
{@
code
timeoutMillis
}
milliseconds. */
public
synchronized
NodeIndex
getLatestNodeIndex
(
long
timeoutMillis
)
{
if
(
this
.
latestNodeIndex
==
null
&&
this
.
nodeIndexerThread
!=
null
&&
timeoutMillis
>
0L
)
{
...
...
src/main/java/org/torproject/onionoo/server/ResourceServlet.java
View file @
680118d0
...
...
@@ -86,8 +86,8 @@ public class ResourceServlet extends HttpServlet {
doGet
(
request
,
response
,
System
.
currentTimeMillis
());
}
/** Handles the HTTP GET request in the wrapped
<
code
>
request
</code>
by
* writing an HTTP GET response to the likewise
<
code
>
response
</code>
,
/** Handles the HTTP GET request in the wrapped
{@
code
request
}
by
* writing an HTTP GET response to the likewise
{@
code
response
}
,
* both of which are wrapped to facilitate testing. */
@SuppressWarnings
(
"checkstyle:variabledeclarationusagedistance"
)
public
void
doGet
(
HttpServletRequestWrapper
request
,
...
...
src/main/java/org/torproject/onionoo/updater/LookupService.java
View file @
680118d0
...
...
@@ -98,7 +98,7 @@ public class LookupService {
}
/** Looks up address strings in the configured
*
<
code
>
GeoLite2-City-*.csv
</code>
and
<
code
>
GeoIPASNum2.csv
</code>
*
{@
code
GeoLite2-City-*.csv
}
and
{@
code
GeoIPASNum2.csv
}
* files and returns all lookup results. */
public
SortedMap
<
String
,
LookupResult
>
lookup
(
SortedSet
<
String
>
addressStrings
)
{
...
...
src/main/java/org/torproject/onionoo/util/FormattingUtils.java
View file @
680118d0
...
...
@@ -25,7 +25,7 @@ public class FormattingUtils {
private
static
final
long
ONE_MINUTE
=
60L
*
ONE_SECOND
;
/** Formats the given number of milliseconds using the format
*
<
code
>
"${minutes}:${seconds}.{milliseconds} minutes"
</code>
. */
*
{@
code
"${minutes}:${seconds}.{milliseconds} minutes"
}
. */
public
static
String
formatMillis
(
long
millis
)
{
return
String
.
format
(
"%02d:%02d.%03d minutes"
,
millis
/
ONE_MINUTE
,
(
millis
%
ONE_MINUTE
)
/
ONE_SECOND
,
millis
%
ONE_SECOND
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment