private void buildLocalCache() { Set<Map.Entry<String, Object>> entrySet = null; try { entrySet = webFilter.getClusteredSessionService().getAttributes(id); } catch (Exception e) { return; } if (entrySet != null) { for (Map.Entry<String, Object> entry : entrySet) { String attributeKey = entry.getKey(); LocalCacheEntry cacheEntry = localCache.get(attributeKey); if (cacheEntry == null) { cacheEntry = new LocalCacheEntry(transientAttributes.contains(attributeKey)); localCache.put(attributeKey, cacheEntry); } if (WebFilter.LOGGER.isFinestEnabled()) { WebFilter.LOGGER.finest("Storing " + attributeKey + " on session " + id); } cacheEntry.setValue(entry.getValue()); cacheEntry.setDirty(false); } } }
private void buildLocalCache() { Set<Map.Entry<String, Object>> entrySet = null; try { entrySet = webFilter.getClusteredSessionService().getAttributes(id); } catch (Exception e) { return; } if (entrySet != null) { for (Map.Entry<String, Object> entry : entrySet) { String attributeKey = entry.getKey(); LocalCacheEntry cacheEntry = localCache.get(attributeKey); if (cacheEntry == null) { cacheEntry = new LocalCacheEntry(transientAttributes.contains(attributeKey)); localCache.put(attributeKey, cacheEntry); } if (LOGGER.isFinestEnabled()) { LOGGER.finest("Storing " + attributeKey + " on session " + id); } cacheEntry.setValue(entry.getValue()); cacheEntry.setDirty(false); } } }
public void removeAttribute(final String name) { LocalCacheEntry entry = localCache.get(name); if (entry != null && entry != WebFilter.NULL_ENTRY) { entry.setValue(null); entry.setRemoved(true); entry.setDirty(true); entry.setReload(false); } if (!deferredWrite) { try { webFilter.getClusteredSessionService().deleteAttribute(id, name); entry.setDirty(false); } catch (Exception ignored) { EmptyStatement.ignore(ignored); } } }
public void removeAttribute(final String name) { LocalCacheEntry entry = localCache.get(name); if (entry != null && entry != WebFilter.NULL_ENTRY) { entry.setValue(null); entry.setRemoved(true); entry.setDirty(true); entry.setReload(false); } if (!deferredWrite) { try { webFilter.getClusteredSessionService().deleteAttribute(id, name); if (entry != null) { entry.setDirty(false); } } catch (Exception e) { LOGGER.warning("Unexpected error occurred.", e); } } }
localCache.put(name, entry); entry.setValue(value); entry.setDirty(true); entry.setRemoved(false);
localCache.put(name, entry); entry.setValue(value); entry.setDirty(true); entry.setRemoved(false);