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:
Sebastian Bazley 2011-01-06 03:05:55 +00:00
parent 4896d1752c
commit d9090f3d37
1 changed files with 4 additions and 2 deletions

View File

@ -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() {