本文整理了Java中net.sf.ehcache.Cache.getAll()
方法的一些代码示例,展示了Cache.getAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cache.getAll()
方法的具体详情如下:
包路径:net.sf.ehcache.Cache
类名称:Cache
方法名:getAll
暂无
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Map<String, Object> get(Collection<String> keys) {
Map<Object,Element> elements = cache.getAll(keys);
Map<String, Object> results = new HashMap<>();
elements.forEach((k,v)-> {
if(v != null)
results.put((String)k, v.getObjectValue());
});
return results;
}
代码示例来源:origin: dandelion/dandelion
@Override
protected Collection<CacheEntry> doGetAll() {
Collection<Element> elements = cache.getAll(cache.getKeysNoDuplicateCheck()).values();
Collection<CacheEntry> cacheElements = new ArrayList<CacheEntry>();
for (Element e : elements) {
cacheElements.add((CacheEntry) e.getObjectValue());
}
return cacheElements;
}
}
代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor
private void refreshDetailGrid() {
this.detailGrid.setItems(this.ehcache.getAll(getKeys(this.ehcache, SEARCH_DEFAULT)).values());
}
代码示例来源:origin: org.jasig.cas/cas-server-integration-ehcache
@Override
public Collection<Ticket> getTickets() {
final Collection<Element> serviceTickets = this.serviceTicketsCache.getAll(
this.serviceTicketsCache.getKeysWithExpiryCheck()).values();
final Collection<Element> tgtTicketsTickets = this.ticketGrantingTicketsCache.getAll(
this.ticketGrantingTicketsCache.getKeysWithExpiryCheck()).values();
final Collection<Ticket> allTickets = new HashSet<>(serviceTickets.size() + tgtTicketsTickets.size());
for (final Element ticket : serviceTickets) {
final Ticket proxiedTicket = getProxiedTicketInstance((Ticket) ticket.getObjectValue());
allTickets.add(proxiedTicket);
}
for (final Element ticket : tgtTicketsTickets) {
final Ticket proxiedTicket = getProxiedTicketInstance((Ticket) ticket.getObjectValue());
allTickets.add(proxiedTicket);
}
return decodeTickets(allTickets);
}
代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor
private void searchAction() {
String value = this.searchTextField.getValue();
if (StringUtils.isEmpty(value)) {
value = "";
}
this.detailGrid.setItems(ehcache.getAll(getKeys(ehcache, value)).values());
}
代码示例来源:origin: kingbbode/spring-boot-ehcache-monitor
return button;
}, new ComponentRenderer()).setCaption("");
grid.setItems(this.ehcache.getAll(getKeys(this.ehcache, SEARCH_DEFAULT)).values());
grid.setWidth("100%");
grid.setSelectionMode(Grid.SelectionMode.NONE);
内容来源于网络,如有侵权,请联系作者删除!