@Override public int getSizeInBytes() { int size = 0; for (Enumeration<String> e = getAttributeNames(); e.hasMoreElements();) { // Don't use this.getAttribute() because we don't want to deserialize // the value. Object value = super.getAttribute(e.nextElement()); if (value instanceof byte[]) { size += ((byte[]) value).length; } } return size; }
@Override public Object getAttribute(String name) { if (readMode == ReadMode.REDIS) { if (!isValidInternal()) { throw new IllegalStateException(sm.getString("standardSession.getAttribute.ise")); } if (name == null) { return null; } return map.get(name); } return super.getAttribute(name); }
@Override public Object getAttribute(String name) { if (readMode == ReadMode.REDIS) { if (!isValidInternal()) { throw new IllegalStateException(sm.getString("standardSession.getAttribute.ise")); } if (name == null) { return null; } return map.get(name); } return super.getAttribute(name); }
@Override public Object getAttribute(String name) { if (readMode == ReadMode.REDIS) { if (!isValidInternal()) { throw new IllegalStateException(sm.getString("standardSession.getAttribute.ise")); } if (name == null) { return null; } return map.get(name); } return super.getAttribute(name); }
@Override public Object getAttribute(String name) { if (readMode == ReadMode.REDIS) { if (!isValidInternal()) { throw new IllegalStateException(sm.getString("standardSession.getAttribute.ise")); } if (name == null) { return null; } return map.get(name); } return super.getAttribute(name); }
@Override public Object getAttribute(String name) { checkBackingCacheAvailable(); Object value = super.getAttribute(name); // If the attribute is a byte[] (meaning it came from the server), // deserialize it and add it to attributes map before returning it. if (value instanceof byte[]) { try { value = BlobHelper.deserializeBlob((byte[]) value); } catch (Exception e) { StringBuilder builder = new StringBuilder(); builder.append(this).append(": Attribute named ").append(name).append( " contains a byte[] that cannot be deserialized due to the following exception"); ((DeltaSessionManager) getManager()).getLogger().warn(builder.toString(), e); } if (this.preferDeserializedForm) { localUpdateAttribute(name, value); } } // Touch the session region if necessary. This is an asynchronous operation // that prevents the session region from prematurely expiring a session that // is only getting attributes. ((DeltaSessionManager) getManager()).addSessionToTouch(getId()); return value; }
/** * {@inheritDoc} */ @Override public Object getAttribute( final String name ) { if (filterAttribute(name)) { _attributesAccessed = true; } return super.getAttribute( name ); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return getAttribute(name); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return getAttribute(name); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return (getAttribute(name)); }
/** * Return the object bound with the specified name in this session, or * <code>null</code> if no object is bound with that name. * * @param name Name of the value to be returned * * @exception IllegalStateException if this method is called on an * invalidated session * * @deprecated As of Version 2.2, this method is replaced by * <code>getAttribute()</code> */ @Override @Deprecated public Object getValue(String name) { return (getAttribute(name)); }
/** * {@inheritDoc} */ @Override public Object getAttribute( final String name ) { if (filterAttribute(name)) { _attributesAccessed = true; } return super.getAttribute( name ); }
@Override public int getSizeInBytes() { int size = 0; for (Enumeration<String> e = getAttributeNames(); e.hasMoreElements();) { // Don't use this.getAttribute() because we don't want to deserialize // the value. Object value = super.getAttribute(e.nextElement()); if (value instanceof byte[]) { size += ((byte[]) value).length; } } return size; }
@Override public Object getAttribute(String name) { if (readMode == ReadMode.REDIS) { if (!isValidInternal()) { throw new IllegalStateException(sm.getString("standardSession.getAttribute.ise")); } if (name == null) { return null; } return map.get(name); } return super.getAttribute(name); }