Java 类org.hibernate.cache.access.AccessType 实例源码

项目:hazelcast-hibernate    文件:HazelcastEntityRegion.java   
@Override
public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new ReadOnlyAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new NonStrictReadWriteAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new ReadWriteAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    throw new CacheException("AccessType \"" + accessType + "\" is not currently supported by Hazelcast.");
}
项目:hazelcast-hibernate    文件:HazelcastCollectionRegion.java   
@Override
public CollectionRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new ReadOnlyAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new NonStrictReadWriteAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new ReadWriteAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    throw new CacheException("AccessType \"" + accessType + "\" is not currently supported by Hazelcast.");
}
项目:hazelcast-archive    文件:HazelcastEntityRegion.java   
public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (null == accessType) {
        throw new CacheException(
                "Got null AccessType while attempting to determine a proper EntityRegionAccessStrategy. This can't happen!");
    }
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new ReadOnlyAccessStrategy(this, props);
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new NonStrictReadWriteAccessStrategy(this, props);
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new ReadWriteAccessStrategy(this, props);
    }
    if (AccessType.TRANSACTIONAL.equals(accessType)) {
        throw new CacheException("Transactional access is not currently supported by Hazelcast.");
    }
    throw new CacheException("Got unknown AccessType \"" + accessType
            + "\" while attempting to build EntityRegionAccessStrategy.");
}
项目:hazelcast-archive    文件:HazelcastCollectionRegion.java   
public CollectionRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (null == accessType) {
        throw new CacheException(
                "Got null AccessType while attempting to build CollectionRegionAccessStrategy. This can't happen!");
    }
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new ReadOnlyAccessStrategy(this, props);
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new NonStrictReadWriteAccessStrategy(this, props);
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new ReadWriteAccessStrategy(this, props);
    }
    if (AccessType.TRANSACTIONAL.equals(accessType)) {
        throw new CacheException("Transactional access is not currently supported by Hazelcast.");
    }
    throw new CacheException("Got unknown AccessType " + accessType
            + " while attempting to build CollectionRegionAccessStrategy.");
}
项目:health-and-care-developer-network    文件:HazelcastEntityRegion.java   
public EntityRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (null == accessType) {
        throw new CacheException(
                "Got null AccessType while attempting to determine a proper EntityRegionAccessStrategy. This can't happen!");
    }
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new ReadOnlyAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new NonStrictReadWriteAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new EntityRegionAccessStrategyAdapter(
                new ReadWriteAccessDelegate<HazelcastEntityRegion>(this, props));
    }
    if (AccessType.TRANSACTIONAL.equals(accessType)) {
        throw new CacheException("Transactional access is not currently supported by Hazelcast.");
    }
    throw new CacheException("Got unknown AccessType \"" + accessType
                             + "\" while attempting to build EntityRegionAccessStrategy.");
}
项目:health-and-care-developer-network    文件:HazelcastCollectionRegion.java   
public CollectionRegionAccessStrategy buildAccessStrategy(final AccessType accessType) throws CacheException {
    if (null == accessType) {
        throw new CacheException(
                "Got null AccessType while attempting to build CollectionRegionAccessStrategy. This can't happen!");
    }
    if (AccessType.READ_ONLY.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new ReadOnlyAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    if (AccessType.NONSTRICT_READ_WRITE.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new NonStrictReadWriteAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    if (AccessType.READ_WRITE.equals(accessType)) {
        return new CollectionRegionAccessStrategyAdapter(
                new ReadWriteAccessDelegate<HazelcastCollectionRegion>(this, props));
    }
    if (AccessType.TRANSACTIONAL.equals(accessType)) {
        throw new CacheException("Transactional access is not currently supported by Hazelcast.");
    }
    throw new CacheException("Got unknown AccessType " + accessType
                             + " while attempting to build CollectionRegionAccessStrategy.");
}
项目:class-guard    文件:LocalRegionFactoryProxy.java   
public AccessType getDefaultAccessType() {
    try {
        Method method = RegionFactory.class.getMethod("getDefaultAccessType");
        return (AccessType) ReflectionUtils.invokeMethod(method, this.regionFactory);
    }
    catch (NoSuchMethodException ex) {
        throw new IllegalStateException("getDefaultAccessType requires Hibernate 3.5+");
    }
}
项目:lams    文件:LocalRegionFactoryProxy.java   
@Override
public AccessType getDefaultAccessType() {
    return this.regionFactory.getDefaultAccessType();
}
项目:spring4-understanding    文件:LocalRegionFactoryProxy.java   
@Override
public AccessType getDefaultAccessType() {
    return this.regionFactory.getDefaultAccessType();
}
项目:hazelcast-hibernate    文件:AbstractHazelcastCacheRegionFactory.java   
@Override
public AccessType getDefaultAccessType() {
    return AccessType.READ_WRITE;
}
项目:hazelcast-hibernate    文件:CacheHitMissNonStrictTest.java   
protected String getCacheStrategy() {
    return AccessType.NONSTRICT_READ_WRITE.getName();
}
项目:hazelcast-hibernate    文件:HibernateTestSupport.java   
protected String getCacheStrategy() {
    return  AccessType.READ_WRITE.getName();
}
项目:hazelcast-hibernate    文件:CacheHitMissReadOnlyTest.java   
protected String getCacheStrategy() {
    return AccessType.READ_ONLY.getName();
}
项目:hazelcast-hibernate    文件:CacheHitMissReadWriteTest.java   
protected String getCacheStrategy() {
    return AccessType.READ_WRITE.getName();
}
项目:hazelcast-archive    文件:HazelcastCacheRegionFactory.java   
public AccessType getDefaultAccessType() {
    return AccessType.READ_WRITE;
}
项目:health-and-care-developer-network    文件:AbstractHazelcastCacheRegionFactory.java   
public AccessType getDefaultAccessType() {
    return AccessType.READ_WRITE;
}