
cn.featherfly.common.storage.Storage Maven / Gradle / Ivy
The newest version!
package cn.featherfly.common.storage;
import cn.featherfly.common.lang.asserts.LocalizedAssert;
/**
*
* 存储
*
*
* @param
* 存储的对象类型
* @param
* 存储后产生的唯一标示,用于取回该对象
* @author zhongj
*
*/
public interface Storage {
LocalizedAssert ASSERT = new LocalizedAssert<>(StorageException.class);
/**
*
* 存储对象
*
*
* @param e
* 对象
* @return 存储后产生的唯一标示,用于取回
*/
ID store(E e);
/**
*
* 获得对象
*
*
* @param id
* 对象唯一标示
* @return 对象
*/
E retrieve(ID id);
/**
*
* 删除对象
*
*
* @param id
* 对象唯一标示
* @return 对象
*/
boolean delete(ID id);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy