litesoft
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package org.litesoft.core;
import org.litesoft.commonfoundation.typeutils.*;
import java.util.*;
public class ServerStores {
private static final ServerStore TEMPLATE = new ServerStore();
private static final ServerStore MASTER = new ServerStore();
private static final Map<ContextID, ServerStore> STORES = Maps.newHashMap();
public static ServerStore get( ContextID pContextID ) {
synchronized ( STORES ) {
ServerStore zServerStore = STORES.get( pContextID );
if ( zServerStore == null ) {
STORES.put( pContextID, zServerStore = new ServerStore( TEMPLATE ) );
}
return zServerStore;
}
}
public static ServerStore getMaster() {
return MASTER;
}
public static void clear( ContextID pContextID ) {
if ( pContextID != null ) {
synchronized ( STORES ) {
LLremoveServerStore( pContextID );
}
}
}
public static void clear() {
synchronized ( STORES ) {
for ( ContextID zContextID : STORES.keySet() ) {
LLremoveServerStore( zContextID );
}
}
}
private static void LLremoveServerStore( ContextID pContextID ) {
ServerStore zServerStore = STORES.remove( pContextID );
if ( zServerStore != null ) {
zServerStore.dispose();
}
}
}
|
Revision |
Author |
Commited |
Message |
953
|
GeorgeS
|
Fri 20 Jun, 2014 23:12:43 +0000 |
Drop Nas-Video. Normalize the SecurityPOs. |