hjg
2023-11-22 975c04c0181b3da82a79cb04abe6a2f1799eb363
提交 | 用户 | 时间
58d006 1 package com.mandi.fendan.util;
A 2
3 public class DBchecksingleton {
4     
5     private volatile static String dbc;
6     
7     private DBchecksingleton(){
8         
9     }
10     
11     public static String setDbc(String dbcUUID,boolean delBdc){
12         synchronized (DBchecksingleton.class){
13             if(dbc==null){
14                 if(!delBdc){
15                     dbc=dbcUUID;
16                 }
17             }else{
18                 if(delBdc){
19                     if(dbc.equals(dbcUUID)){
20                         dbc=null;
21                     }
22                 }
23             }
24         }
25         return dbc;
26     }
27 }