/** * Return the compiled pattern used for including session attributes to a session-backup. * * @return the sessionAttributePattern */ @CheckForNull Pattern getSessionAttributePattern() { return _msm.getSessionAttributePattern(); }
/** * Return the compiled pattern used for including session attributes to a session-backup. * * @return the sessionAttributePattern */ @CheckForNull Pattern getSessionAttributePattern() { return _msm.getSessionAttributePattern(); }
/** * Return the compiled pattern used for including session attributes to a session-backup. * * @return the sessionAttributePattern */ @CheckForNull Pattern getSessionAttributePattern() { return _msm.getSessionAttributePattern(); }
/** * Return the compiled pattern used for including session attributes to a session-backup. * * @return the sessionAttributePattern */ @CheckForNull Pattern getSessionAttributePattern() { return _msm.getSessionAttributePattern(); }
/** * Check whether the given attribute name matches our name pattern and shall be stored in memcached. * * @return true if the name matches */ private boolean filterAttribute( final String name ) { if ( this.manager == null ) { throw new IllegalStateException( "There's no manager set." ); } final Pattern pattern = ((SessionManager)manager).getMemcachedSessionService().getSessionAttributePattern(); if ( pattern == null ) { return true; } return pattern.matcher(name).matches(); }
/** * Filter map of attributes using our name pattern. * * @return the filtered attribute map that only includes attributes that shall be stored in memcached. */ public ConcurrentMap<String, Object> getAttributesFiltered() { if ( this.manager == null ) { throw new IllegalStateException( "There's no manager set." ); } final Pattern pattern = ((SessionManager)manager).getMemcachedSessionService().getSessionAttributePattern(); final ConcurrentMap<String, Object> attributes = getAttributesInternal(); if ( pattern == null ) { return attributes; } final ConcurrentMap<String, Object> result = new ConcurrentHashMap<String, Object>( attributes.size() ); for ( final Map.Entry<String, Object> entry: attributes.entrySet() ) { if ( pattern.matcher(entry.getKey()).matches() ) { result.put( entry.getKey(), entry.getValue() ); } } return result; }
/** * Return the compiled pattern used for including session attributes to a session-backup. * * @return the sessionAttributePattern */ @CheckForNull Pattern getSessionAttributePattern() { return _msm.getSessionAttributePattern(); }
/** * Check whether the given attribute name matches our name pattern and shall be stored in memcached. * * @return true if the name matches */ private boolean filterAttribute( final String name ) { if ( this.manager == null ) { throw new IllegalStateException( "There's no manager set." ); } final Pattern pattern = ((SessionManager)manager).getMemcachedSessionService().getSessionAttributePattern(); if ( pattern == null ) { return true; } return pattern.matcher(name).matches(); }
/** * Filter map of attributes using our name pattern. * * @return the filtered attribute map that only includes attributes that shall be stored in memcached. */ public ConcurrentMap<String, Object> getAttributesFiltered() { if ( this.manager == null ) { throw new IllegalStateException( "There's no manager set." ); } final Pattern pattern = ((SessionManager)manager).getMemcachedSessionService().getSessionAttributePattern(); final ConcurrentMap<String, Object> attributes = getAttributesInternal(); if ( pattern == null ) { return attributes; } final ConcurrentMap<String, Object> result = new ConcurrentHashMap<String, Object>( attributes.size() ); for ( final Map.Entry<String, Object> entry: attributes.entrySet() ) { if ( pattern.matcher(entry.getKey()).matches() ) { result.put( entry.getKey(), entry.getValue() ); } } return result; }