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

org.nervousync.cache.api.CacheManager Maven / Gradle / Ivy

The newest version!
/*
 * Licensed to the Nervousync Studio (NSYC) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.nervousync.cache.api;

import org.nervousync.cache.config.CacheConfig;

/**
 * 

Cache manager interface

*

缓存管理器接口

*/ public interface CacheManager { /** *

Register cache instance by given cache name and config instance

*

使用指定的缓存名称、配置信息注册缓存

* * @param cacheName Cache identify name * 缓存识别名称 * @param cacheConfig Cache config instance * 缓存配置信息 */ boolean register(final String cacheName, final CacheConfig cacheConfig); /** *

Check given cache name was registered

*

使用指定的缓存名称、配置信息注册缓存

* * @param cacheName Cache identify name * 缓存识别名称 */ boolean registered(final String cacheName); /** *

Retrieve cache client instance by given cache name

*

使用指定的缓存名称获取缓存操作客户端

* * @param cacheName Cache identify name * 缓存识别名称 * @return Cache client instance or null if cache name not registered * 缓存客户端实例,若缓存名称未注册则返回null */ CacheClient client(final String cacheName); /** *

Remove cache instance from registered list

*

移除指定的缓存

* * @param cacheName Cache identify name * 缓存识别名称 */ void deregister(final String cacheName); /** *

Destroy manager instance

*

销毁当前的管理实例

*/ void destroy(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy