/** * @see org.apache.fulcrum.cache.GlobalCacheService#getKeys() */ public List getKeys() { return this.cache.getKeysWithExpiryCheck(); }
@Override public CacheStatic getCacheStatic() { cacheStatistics.setItemSize(enCache.getKeysWithExpiryCheck().size()); return cacheStatistics; }
@Override public int serviceTicketCount() { return BooleanUtils.toInteger(this.supportRegistryState, this.serviceTicketsCache.getKeysWithExpiryCheck() .size(), super.serviceTicketCount()); } }
/** * {@inheritDoc} */ public int getSizeBasedOnAccuracy(int statisticsAccuracy) throws IllegalStateException, CacheException { if (statisticsAccuracy == Statistics.STATISTICS_ACCURACY_BEST_EFFORT) { return getSize(); } else if (statisticsAccuracy == Statistics.STATISTICS_ACCURACY_GUARANTEED) { return getKeysWithExpiryCheck().size(); } else if (statisticsAccuracy == Statistics.STATISTICS_ACCURACY_NONE) { return getKeysNoDuplicateCheck().size(); } throw new IllegalArgumentException("Unknown statistics accuracy: " + statisticsAccuracy); }
@Override public int sessionCount() { return BooleanUtils.toInteger(this.supportRegistryState, this.ticketGrantingTicketsCache .getKeysWithExpiryCheck().size(), super.sessionCount()); }
@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); }
/** * Description: <br> * * @author 王伟<br> * @taskId <br> * @param nodeName * @param type * @return <br> */ @SuppressWarnings("unchecked") @Override public <T> Map<String, T> getNode(String nodeName, Class<T> type) { Cache cache = getCache(nodeName); List<String> keys = cache.getKeysWithExpiryCheck(); Map<String, T> cacheMap = new HashMap<String, T>(); if (CollectionUtils.isNotEmpty(keys)) { for (String key : keys) { Element element = cache.get(key); Object value = (element != null ? element.getObjectValue() : null); if (value != null && type != null && !type.isInstance(value)) { throw new IllegalStateException( "Cached value is not of required type [" + type.getName() + "]: " + value); } cacheMap.put(key, (T) value); } } return cacheMap; }
List<String> keys = m_attCache.getKeysWithExpiryCheck(); all = new ArrayList<>(); for (String key : keys) {
List<String> keys = m_cache.getKeysWithExpiryCheck(); all = new TreeSet<WikiPage>(); for (String key : keys) {
if (!cssSkinFailureCache.getKeysWithExpiryCheck().contains(cssInstanceKey)) { createLessIncludeFile(data); processLessFile(data);
/** * {@inheritDoc} */ @Override public void moveAttachmentsForPage( String oldParent, String newParent ) throws ProviderException { m_provider.moveAttachmentsForPage(oldParent, newParent); m_cache.remove(newParent); m_cache.remove(oldParent); // // This is a kludge to make sure that the pages are removed // from the other cache as well. // String checkName = oldParent + "/"; @SuppressWarnings("unchecked") List< String > names = m_cache.getKeysWithExpiryCheck(); for( String name : names ) { if( name.startsWith( checkName ) ) { m_attCache.remove(name); } } }