Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Database getInstance()
- {
- if( instance == null )
- {
- return instanceNotFoundDoubleCheckSynced();
- }
- return instance;
- }
- synchronized private static Database instanceNotFoundDoubleCheckSynced()
- {
- if( instance == null )
- {
- Connection connection = establishConnection();
- if( connection != null )
- {
- instance = new Database( connection );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement