src/org/sonews/storage/StorageManager.java
changeset 42 7f84f4de2893
parent 37 74139325d305
child 45 7e24949b87b0
     1.1 --- a/src/org/sonews/storage/StorageManager.java	Wed May 04 18:34:21 2011 +0200
     1.2 +++ b/src/org/sonews/storage/StorageManager.java	Mon Jun 06 20:12:21 2011 +0200
     1.3 @@ -15,22 +15,19 @@
     1.4   *   You should have received a copy of the GNU General Public License
     1.5   *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     1.6   */
     1.7 -
     1.8  package org.sonews.storage;
     1.9  
    1.10  /**
    1.11 - *
    1.12 + * Provides access to a storage backend.
    1.13   * @author Christian Lins
    1.14   * @since sonews/1.0
    1.15   */
    1.16 -public final class StorageManager
    1.17 -{
    1.18 +public final class StorageManager {
    1.19  
    1.20  	private static StorageProvider provider;
    1.21  
    1.22  	public static Storage current()
    1.23 -		throws StorageBackendException
    1.24 -	{
    1.25 +			throws StorageBackendException {
    1.26  		synchronized (StorageManager.class) {
    1.27  			if (provider == null) {
    1.28  				return null;
    1.29 @@ -40,8 +37,7 @@
    1.30  		}
    1.31  	}
    1.32  
    1.33 -	public static StorageProvider loadProvider(String pluginClassName)
    1.34 -	{
    1.35 +	public static StorageProvider loadProvider(String pluginClassName) {
    1.36  		try {
    1.37  			Class<?> clazz = Class.forName(pluginClassName);
    1.38  			Object inst = clazz.newInstance();
    1.39 @@ -56,8 +52,7 @@
    1.40  	 * Sets the current storage provider.
    1.41  	 * @param provider
    1.42  	 */
    1.43 -	public static void enableProvider(StorageProvider provider)
    1.44 -	{
    1.45 +	public static void enableProvider(StorageProvider provider) {
    1.46  		synchronized (StorageManager.class) {
    1.47  			if (StorageManager.provider != null) {
    1.48  				disableProvider();
    1.49 @@ -69,8 +64,7 @@
    1.50  	/**
    1.51  	 * Disables the current provider.
    1.52  	 */
    1.53 -	public static void disableProvider()
    1.54 -	{
    1.55 +	public static void disableProvider() {
    1.56  		synchronized (StorageManager.class) {
    1.57  			provider = null;
    1.58  		}