Examples of DistributableSessionMetadata


Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

      Fqn<String> fqn = getSessionFqn(combinedPath_, realId);
     
      Map<Object, Object> map = new HashMap<Object, Object>();
      map.put(VERSION_KEY, Integer.valueOf(sessionData.getVersion()));
     
      DistributableSessionMetadata dsm = sessionData.getMetadata();
      if (dsm != null)
      {  
         map.put(METADATA_KEY, dsm);
      }
     
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

                                       Map<Object, Object> distributedCacheData,
                                       boolean includeAttributes)
   {
      Integer version = (Integer) distributedCacheData.get(VERSION_KEY);
      Long timestamp = (Long) distributedCacheData.get(TIMESTAMP_KEY);
      DistributableSessionMetadata metadata = (DistributableSessionMetadata) distributedCacheData.get(METADATA_KEY);
      Map<String, Object> attrs = includeAttributes ? getSessionAttributes(realId, distributedCacheData) : null;     
      return new IncomingDistributableSessionDataImpl(version, timestamp, metadata, attrs);
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

   @Override
   protected OutgoingSessionGranularitySessionData getOutgoingSessionData()
   {
      Map<String, Object> attrs = isSessionAttributeMapDirty() ? getSessionAttributeMap() : null;
      DistributableSessionMetadata metadata = isSessionMetadataDirty() ? getSessionMetadata() : null;
      Long timestamp = attrs != null || metadata != null || getMustReplicateTimestamp() ? Long.valueOf(getSessionTimestamp()) : null;
      return new OutgoingData(getRealId(), getVersion(), timestamp, metadata, attrs);
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

   // --------------------------------------------- Overridden Protected Methods

   @Override
   protected OutgoingDistributableSessionData getOutgoingSessionData()
   {
      DistributableSessionMetadata metadata = isSessionMetadataDirty() ? getSessionMetadata() : null;
      Long timestamp = metadata != null || isSessionAttributeMapDirty() || getMustReplicateTimestamp() ? Long.valueOf(getSessionTimestamp()) : null;
      return new OutgoingDistributableSessionDataImpl(getRealId(), getVersion(), timestamp, metadata);
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

     
      long ts = sessionData.getTimestamp();
      this.lastAccessedTime = this.thisAccessedTime = ts;
      this.timestamp.set(ts);
     
      DistributableSessionMetadata md = sessionData.getMetadata();
      // TODO -- get rid of these field and delegate to metadata
      this.id = md.getId();
      this.creationTime = md.getCreationTime();
      this.maxInactiveInterval = md.getMaxInactiveInterval();
      this.isNew = md.isNew();
      this.isValid = md.isValid();
      this.metadata = md;
     
      // Get our id without any jvmRoute appended
      parseRealId(id);
     
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

            removeAttrs = new HashSet<String>(attrRemovedSet_);
         }
        
         clearAttrChangedMaps();
      }
      DistributableSessionMetadata metadata = isSessionMetadataDirty() ? getSessionMetadata() : null;
      Long timestamp = modAttrs != null || removeAttrs != null || metadata != null || getMustReplicateTimestamp() ? Long.valueOf(getSessionTimestamp()) : null;
      return new OutgoingData(getRealId(), getVersion(), timestamp, metadata, modAttrs, removeAttrs);
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

         {
            String realId = entry.getKey();
            String owner = entry.getValue();

            long ts = -1;
            DistributableSessionMetadata md = null;
            try
            {
               IncomingDistributableSessionData sessionData = proxy_.getSessionData(realId, owner, false);
               ts = sessionData.getTimestamp();
               md = sessionData.getMetadata();
            }
            catch (Exception e)
            {
               // most likely a lock conflict if the session is being updated remotely;
               // ignore it and use default values for timstamp and maxInactive
               log_.debug("Problem reading metadata for session " + realId + " -- " + e.toString());              
            }
           
            long lastMod = ts == -1 ? System.currentTimeMillis() : ts;
            int maxLife = md == null ? getMaxInactiveInterval() : md.getMaxInactiveInterval();
           
            OwnedSessionUpdate osu = new OwnedSessionUpdate(owner, lastMod, maxLife, false);
            unloadedSessions_.put(realId, osu);
            if (passivate)
            {
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

                                       Map<Object, Object> distributedCacheData,
                                       boolean includeAttributes)
   {
      AtomicInteger version = (AtomicInteger) distributedCacheData.get(VERSION_KEY);
      AtomicLong timestamp = (AtomicLong) distributedCacheData.get(TIMESTAMP_KEY);
      DistributableSessionMetadata metadata = (DistributableSessionMetadata) distributedCacheData.get(METADATA_KEY);
      Map<String, Object> attrs = includeAttributes ? getSessionAttributes(realId, distributedCacheData) : null;     
      return new DistributableSessionDataImpl(version, timestamp, metadata, attrs);
   }
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

            // If requested session is no longer in the cache; return null
            if (map == null) return null;
           
            Integer version = SessionMapEntry.VERSION.get(map);
            Long timestamp = SessionMapEntry.TIMESTAMP.get(map);
            DistributableSessionMetadata metadata = SessionMapEntry.METADATA.get(map);
            IncomingDistributableSessionDataImpl result = new IncomingDistributableSessionDataImpl(version, timestamp, metadata);
           
            if (includeAttributes)
            {
               try
View Full Code Here

Examples of org.jboss.web.tomcat.service.session.distributedcache.spi.DistributableSessionMetadata

     
      String sessionId = event.getKey();
     
      Integer version = SessionMapEntry.VERSION.get(map);
      Long timestamp = SessionMapEntry.TIMESTAMP.get(map);
      DistributableSessionMetadata metadata = SessionMapEntry.METADATA.get(map);
     
      if ((version != null) && (timestamp != null) && (metadata != null))
      {
         boolean updated = this.manager.sessionChangedInDistributedCache(sessionId, null, version.intValue(), timestamp.longValue(), metadata);
        
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.