本文整理汇总了Java中org.apache.commons.jcs.access.CacheAccess类的典型用法代码示例。如果您正苦于以下问题:Java CacheAccess类的具体用法?Java CacheAccess怎么用?Java CacheAccess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CacheAccess类属于org.apache.commons.jcs.access包,在下文中一共展示了CacheAccess类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
public void init(AppConfiguration appConfig, Properties cacheProps,
ScheduledExecutorService scheduledService) {
m_appConfig = appConfig;
synchronized (JCSCache.class) {
s_ccm = CompositeCacheManager.getUnconfiguredInstance();
s_ccm.configure(cacheProps);
s_cache = s_ccm.getCache("default");
s_idc = getIndexDiskCache(s_cache);
s_cacheAccess = new CacheAccess<>(s_cache);
}
m_scheduledService = scheduledService;
launchSaveCacheThread();
m_isInitialized = true;
}
示例2: addGui
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
@Override
public void addGui(PreferenceTabbedPane gui) {
JPanel panel = new JPanel();
panel.setLayout(new GridBagLayout());
CacheAccess<String, BufferedImageCacheEntry> cache = TMSLayer.getCache();
DefaultTableModel model = getTableModel(cache);
panel.add(getTableForCache(cache, model), GBC.eol().fill(GBC.BOTH));
getTabPreferenceSetting(gui).addSubTab(this, "Export MbTiles", new JScrollPane(panel));
}
示例3: getTableForCache
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
private JTable getTableForCache(final CacheAccess<String, BufferedImageCacheEntry> cache, final TableModel tableModel) {
final JTable ret = new JTable(tableModel);
ButtonColumn buttonColumn = new ButtonColumn(new CacheExportAction(cache, ret), "Export");
TableColumn tableColumn = ret.getColumnModel().getColumn(2);
tableColumn.setCellRenderer(buttonColumn);
tableColumn.setCellEditor(buttonColumn);
return ret;
}
示例4: CacheExportAction
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
private CacheExportAction(CacheAccess<String, BufferedImageCacheEntry> cache, JTable ret) {
this.cache = cache;
this.ret = ret;
}
示例5: getTableModel
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
private static DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) {
return new CacheExportPanelTableModel(CacheContentsPanel.getCacheStats(cache), new String[]{tr("Cache name"), tr("Object Count"), tr("Export")});
}
示例6: ExportTask
import org.apache.commons.jcs.access.CacheAccess; //导入依赖的package包/类
public ExportTask(CacheAccess<String, BufferedImageCacheEntry> cache, String layerName, File saveFile) {
super(tr("Exporing {0} cache files", layerName));
this.layerName = layerName;
this.cache = cache;
this.saveFile = saveFile;
}