Java Code Examples for org.hibernate.cache.spi.access.AccessType#TRANSACTIONAL

The following examples show how to use org.hibernate.cache.spi.access.AccessType#TRANSACTIONAL . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedissonEntityRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteEntityRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalEntityRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 2
Source File: RedissonEntityRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteEntityRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalEntityRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 3
Source File: RedissonCollectionRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public CollectionRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteCollectionRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalCollectionRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 4
Source File: RedissonNaturalIdRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalNaturalIdRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 5
Source File: RedissonEntityRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteEntityRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteEntityRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalEntityRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 6
Source File: RedissonCollectionRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public CollectionRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteCollectionRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalCollectionRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 7
Source File: RedissonNaturalIdRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalNaturalIdRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 8
Source File: RedissonCollectionRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public CollectionRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteCollectionRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteCollectionRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalCollectionRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 9
Source File: RedissonNaturalIdRegion.java    From redisson with Apache License 2.0 6 votes vote down vote up
@Override
public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException {
    if (accessType == AccessType.READ_ONLY) {
        return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.READ_WRITE) {
        return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache);
    }
    if (accessType == AccessType.NONSTRICT_READ_WRITE) {
        return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this);
    }
    if (accessType == AccessType.TRANSACTIONAL) {
        return new TransactionalNaturalIdRegionAccessStrategy(settings, this);
    }
    
    throw new CacheException("Unsupported access strategy: " + accessType);
}
 
Example 10
Source File: NaturalIdTransactionalAccess.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public AccessType getAccessType() {
	return AccessType.TRANSACTIONAL;
}
 
Example 11
Source File: RedissonRegionFactory.java    From redisson with Apache License 2.0 4 votes vote down vote up
@Override
public AccessType getDefaultAccessType() {
    return AccessType.TRANSACTIONAL;
}
 
Example 12
Source File: RedissonRegionFactory.java    From redisson with Apache License 2.0 4 votes vote down vote up
@Override
public AccessType getDefaultAccessType() {
    return AccessType.TRANSACTIONAL;
}
 
Example 13
Source File: HibernateL2CacheTransactionalSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected AccessType[] accessTypes() {
    return new AccessType[]{AccessType.TRANSACTIONAL};
}
 
Example 14
Source File: HibernateL2CacheTransactionalSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected AccessType[] accessTypes() {
    return new AccessType[]{AccessType.TRANSACTIONAL};
}
 
Example 15
Source File: RedissonRegionFactory.java    From redisson with Apache License 2.0 4 votes vote down vote up
@Override
public AccessType getDefaultAccessType() {
    return AccessType.TRANSACTIONAL;
}
 
Example 16
Source File: RedissonRegionFactory.java    From redisson with Apache License 2.0 4 votes vote down vote up
@Override
public AccessType getDefaultAccessType() {
    return AccessType.TRANSACTIONAL;
}
 
Example 17
Source File: HibernateL2CacheTransactionalSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected AccessType[] accessTypes() {
    return new AccessType[]{AccessType.TRANSACTIONAL};
}
 
Example 18
Source File: CollectionTransactionAccess.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public AccessType getAccessType() {
	return AccessType.TRANSACTIONAL;
}
 
Example 19
Source File: EntityTransactionalAccess.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public AccessType getAccessType() {
	return AccessType.TRANSACTIONAL;
}