Package com.caucho.distcache

Examples of com.caucho.distcache.ByteStreamCache


    }
  }
 
  private long getLastUseTime()
  {
    ByteStreamCache cache = _manager.getCache();

    if (cache == null)
      return _lastUseTime;

    ExtCacheEntry entry = cache.peekExtCacheEntry(_id);
    // server/01ke
   
    if (entry == null)
      return _lastUseTime;
    else
View Full Code Here


    // server/01k0
    if (_useCount.get() > 1)
      return true;

    try {
      ByteStreamCache cache = _manager.getCache();

      if (cache == null)
        return ! isNew;

      // server/015m
      if (! isNew && _manager.isSaveOnShutdown())
        return true;

      ExtCacheEntry entry = cache.getExtCacheEntry(_id);
      ExtCacheEntry cacheEntry = _cacheEntry;

      if (entry != null) {
        // server/01a1, #4419
        _idleTimeout = entry.getIdleTimeout() * 4 / 5;
        //_isIdleSet = true;
      }
     
      if (entry != null && cacheEntry != null
          && cacheEntry.getValueHashKey() != null
          && cacheEntry.getValueHashKey().equals(entry.getValueHashKey())) {
        if (log.isLoggable(Level.FINE)) {
          log.fine(this + " session load-same valueHash="
                   + (entry != null ? entry.getValueHashKey() : null));
        }
       
        return true;
      }

      TempOutputStream os = new TempOutputStream();

      if (cache.get(_id, os)) {
        InputStream is = os.getInputStream();

        SessionDeserializer in = _manager.createSessionDeserializer(is);

        if (log.isLoggable(Level.FINE)) {
View Full Code Here

  /**
   * Returns a debug string for the session
   */
  public String getSessionSerializationDebug(String id)
  {
    ByteStreamCache cache = getCache();

    if (cache == null)
      return null;

    try {
      TempOutputStream os = new TempOutputStream();

      if (cache.get(id, os)) {
        InputStream is = os.getInputStream();

        StringWriter writer = new StringWriter();

        HessianDebugInputStream dis
View Full Code Here

  /**
   * Returns a debug string for the session
   */
  public String getSessionSerializationDebug(String id)
  {
    ByteStreamCache cache = getCache();

    if (cache == null)
      return null;

    try {
      TempOutputStream os = new TempOutputStream();

      if (cache.get(id, os)) {
        InputStream is = os.getInputStream();

        StringWriter writer = new StringWriter();

        HessianDebugInputStream dis
View Full Code Here

    // server/01k0
    if (_useCount.get() > 1)
      return true;

    try {
      ByteStreamCache cache = _manager.getCache();

      if (cache == null)
        return ! isNew;

      // server/015m
      if (! isNew && _manager.isSaveOnShutdown())
        return true;

      ExtCacheEntry entry = cache.getExtCacheEntry(_id);
      ExtCacheEntry cacheEntry = _cacheEntry;

      if (entry != null && cacheEntry != null
          && cacheEntry.getValueHashKey() != null
          && cacheEntry.getValueHashKey().equals(entry.getValueHashKey())) {
        return true;
      }

      TempOutputStream os = new TempOutputStream();

      if (cache.get(_id, os)) {
        InputStream is = os.getInputStream();

        SessionDeserializer in = _manager.createSessionDeserializer(is);

        if (log.isLoggable(Level.FINE)) {
View Full Code Here

TOP

Related Classes of com.caucho.distcache.ByteStreamCache

Copyright © 2018 www.massapicom. 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.