gluu
静的公開メンバ関数 | 静的公開変数類 | 全メンバ一覧
org.xdi.oxauth.dev.TestUUID クラス
org.xdi.oxauth.dev.TestUUID 連携図
Collaboration graph

静的公開メンバ関数

static void main (String[] args) throws InterruptedException
 

静的公開変数類

static ConcurrentHashMap< String, String > map = new ConcurrentHashMap<String, String>()
 
static long errors_count = 0
 
static long done = 0
 

詳解

関数詳解

◆ main()

static void org.xdi.oxauth.dev.TestUUID.main ( String []  args) throws InterruptedException
inlinestatic
12  {
13  for (int i = 0; i < 100; i++)
14  new Thread(new Runnable() {
15 
16  @Override
17  public void run() {
18  for (int i = 0; i < 10000; i++ ) {
19  String uuid = UUID.randomUUID().toString();
20  if (map.contains(uuid)) {
21  errors_count++;
22  } else {
23  map.put(uuid, uuid);
24  }
25  }
26  System.out.println("Done");
27  done++;
28  }
29  }).start();
30 
31  while (true) {
32  Thread.sleep(5*1000);
33  if (done == 100) {
34  break;
35  }
36  }
37 
38  System.out.println(map.size());
39  System.out.println(errors_count);
40  }
static long done
Definition: TestUUID.java:10
static ConcurrentHashMap< String, String > map
Definition: TestUUID.java:8
static long errors_count
Definition: TestUUID.java:9

メンバ詳解

◆ done

long org.xdi.oxauth.dev.TestUUID.done = 0
static

◆ errors_count

long org.xdi.oxauth.dev.TestUUID.errors_count = 0
static

◆ map

ConcurrentHashMap<String, String> org.xdi.oxauth.dev.TestUUID.map = new ConcurrentHashMap<String, String>()
static

このクラス詳解は次のファイルから抽出されました: