All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.maxifier.mxcache.provider.StorageFactory Maven / Gradle / Ivy

Go to download

Constains all classes necessary for launching a MxCache-instrumentated application

There is a newer version: 2.6.9
Show newest version
/*
 * Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
 */
package com.maxifier.mxcache.provider;

import com.maxifier.mxcache.storage.Storage;

import javax.annotation.Nonnull;

/**
 * @author Alexander Kochurov ([email protected])
 */
public interface StorageFactory {
    /**
     * @param owner an owner of the cache. Do not store direct references to owners outside of storage!
     * @return an instance of cache storage for given owner. Each invocation should return a new instance of storage.
     * @throws Exception you are allowed to throw any exception. Exceptions are ignored, if storage factory fails a
     *    default one would be used.
     *
     */
    @Nonnull
    Storage createStorage(T owner) throws Exception;

    /**
     * @return any string that represents your cache implementation details.
     *     This string is visible in MBean details.
     */
    String getImplementationDetails();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy