Skip to content

Commit a7687a6

Browse files
committed
add a singleton
1 parent a20db7c commit a7687a6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CLASDecoderPool.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,12 @@ public CLASDecoderPool(int size, String variation, String timestamp) {
3131
add(d);
3232
}
3333
}
34+
35+
static CLASDecoderPool instance = null;
36+
37+
public static CLASDecoderPool getInstance() {
38+
if (instance == null)
39+
instance = new CLASDecoderPool(64,"default",null);
40+
return instance;
41+
}
3442
}

0 commit comments

Comments
 (0)