Not @Immutable, but it is @ThreadSafe
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1055726 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4896d1752c
commit
d9090f3d37
|
@ -33,17 +33,19 @@ import java.security.SecureRandom;
|
|||
import java.util.Formatter;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.http.annotation.Immutable;
|
||||
import org.apache.http.annotation.GuardedBy;
|
||||
import org.apache.http.annotation.ThreadSafe;
|
||||
|
||||
/**
|
||||
* Should produce reasonably unique tokens.
|
||||
*/
|
||||
@Immutable
|
||||
@ThreadSafe
|
||||
class BasicIdGenerator {
|
||||
|
||||
private final String hostname;
|
||||
private final SecureRandom rnd;
|
||||
|
||||
@GuardedBy("this")
|
||||
private long count;
|
||||
|
||||
public BasicIdGenerator() {
|
||||
|
|
Loading…
Reference in New Issue