Examples of CacheConcurrencyStrategy


Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AnnotationConfiguration.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    log.trace( "Discovered default cache concurrency strategy via config [" + strategyName + "]" );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      log.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    log.debug( "Setting default cache concurrency strategy via config [" + strategy.name() + "]" );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
        LOG.trace("Discovered default cache concurrency strategy via config [" + strategyName + "]");
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
            LOG.trace("Discovered default cache concurrency strategy specified nothing");
      return;
    }

        LOG.debugf("Setting default cache concurrency strategy via config [%s]", strategy.name());
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.annotations.CacheConcurrencyStrategy

      return;
    }

    final String strategyName = properties.getProperty( AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY );
    LOG.tracev( "Discovered default cache concurrency strategy via config [{0}]", strategyName );
    CacheConcurrencyStrategy strategy = CacheConcurrencyStrategy.parse( strategyName );
    if ( strategy == null ) {
      LOG.trace( "Discovered default cache concurrency strategy specified nothing" );
      return;
    }

    LOG.debugf( "Setting default cache concurrency strategy via config [%s]", strategy.name() );
    DEFAULT_CACHE_CONCURRENCY_STRATEGY = strategy;
  }
View Full Code Here

Examples of org.hibernate.cache.CacheConcurrencyStrategy

      ( ( OptimisticCache ) underlyingCache ).setSource( new OptimisticCacheSourceAdapter( metadata ) );
    }
  }

  public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    CacheConcurrencyStrategy ccs;
    if ( AccessType.READ_ONLY.equals( accessType ) ) {
      if ( metadata.isMutable() ) {
        log.warn( "read-only cache configured for mutable entity [" + getName() + "]" );
      }
      ccs = new ReadOnlyCache();
    }
    else if ( AccessType.READ_WRITE.equals( accessType ) ) {
      ccs = new ReadWriteCache();
    }
    else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) {
      ccs = new NonstrictReadWriteCache();
    }
    else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) {
      ccs = new TransactionalCache();
    }
    else {
      throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
    }
    ccs.setCache( underlyingCache );
    return new EntityAccessStrategyAdapter( this, ccs, settings );
  }
View Full Code Here

Examples of org.hibernate.cache.CacheConcurrencyStrategy

      ( ( OptimisticCache ) underlyingCache ).setSource( new OptimisticCacheSourceAdapter( metadata ) );
    }
  }

  public CollectionRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    CacheConcurrencyStrategy ccs;
    if ( AccessType.READ_ONLY.equals( accessType ) ) {
      if ( metadata.isMutable() ) {
        log.warn( "read-only cache configured for mutable collection [" + getName() + "]" );
      }
      ccs = new ReadOnlyCache();
    }
    else if ( AccessType.READ_WRITE.equals( accessType ) ) {
      ccs = new ReadWriteCache();
    }
    else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) {
      ccs = new NonstrictReadWriteCache();
    }
    else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) {
      ccs = new TransactionalCache();
    }
    else {
      throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
    }
    ccs.setCache( underlyingCache );
    return new CollectionAccessStrategyAdapter( this, ccs, settings );
  }
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.