-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/development' into development
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
95 changes: 95 additions & 0 deletions
95
runtime/src/main/java/ortus/boxlang/runtime/services/CacheService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/** | ||
* [BoxLang] | ||
* | ||
* Copyright [2023] [Ortus Solutions, Corp] | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package ortus.boxlang.runtime.services; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* | ||
*/ | ||
public class CacheService extends BaseService { | ||
|
||
/** | ||
* -------------------------------------------------------------------------- | ||
* Private Properties | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* Logger | ||
*/ | ||
private static final Logger logger = LoggerFactory.getLogger( CacheService.class ); | ||
|
||
/** | ||
* Singleton instance | ||
*/ | ||
private static CacheService instance; | ||
|
||
/** | ||
* -------------------------------------------------------------------------- | ||
* Constructor(s) | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
private CacheService() { | ||
logger.info( "CacheService.onStartup()" ); | ||
} | ||
|
||
/** | ||
* Get an instance of the service | ||
* | ||
* @return The singleton instance | ||
*/ | ||
public static synchronized CacheService getInstance() { | ||
if ( instance == null ) { | ||
instance = new CacheService(); | ||
} | ||
return instance; | ||
} | ||
|
||
/** | ||
* -------------------------------------------------------------------------- | ||
* Runtime Service Event Methods | ||
* -------------------------------------------------------------------------- | ||
*/ | ||
|
||
/** | ||
* The startup event is fired when the runtime starts up | ||
*/ | ||
public void onStartup() { | ||
} | ||
|
||
/** | ||
* The configuration load event is fired when the runtime loads its configuration | ||
*/ | ||
public void onConfigurationLoad() { | ||
logger.info( "CacheService.onConfigurationLoad()" ); | ||
} | ||
|
||
/** | ||
* The shutdown event is fired when the runtime shuts down | ||
*/ | ||
public void onShutdown() { | ||
logger.info( "CacheService.onShutdown()" ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters