Java Code Examples for org.hibernate.cache.spi.access.AccessType#READ_ONLY
The following examples show how to use
org.hibernate.cache.spi.access.AccessType#READ_ONLY .
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: RedissonNaturalIdRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 2
Source File: RedissonCollectionRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 3
Source File: RedissonEntityRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 4
Source File: RedissonNaturalIdRegion.java From redisson with Apache License 2.0 | 6 votes |
@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: RedissonCollectionRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 6
Source File: RedissonEntityRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 7
Source File: RedissonNaturalIdRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 |
@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: RedissonEntityRegion.java From redisson with Apache License 2.0 | 6 votes |
@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 10
Source File: CollectionReadOnlyAccess.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public AccessType getAccessType() { return AccessType.READ_ONLY; }
Example 11
Source File: NaturalIdReadOnlyAccess.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public AccessType getAccessType() { return AccessType.READ_ONLY; }
Example 12
Source File: EntityReadOnlyAccess.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public AccessType getAccessType() { return AccessType.READ_ONLY; }
Example 13
Source File: HibernateL2CacheSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** * @return Hibernate L2 cache access types to test. */ protected AccessType[] accessTypes() { return new AccessType[]{AccessType.READ_ONLY, AccessType.NONSTRICT_READ_WRITE, AccessType.READ_WRITE}; }
Example 14
Source File: HibernateL2CacheSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** * @return Hibernate L2 cache access types to test. */ protected AccessType[] accessTypes() { return new AccessType[]{AccessType.READ_ONLY, AccessType.NONSTRICT_READ_WRITE, AccessType.READ_WRITE}; }
Example 15
Source File: HibernateL2CacheSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** * @return Hibernate L2 cache access types to test. */ protected AccessType[] accessTypes() { return new AccessType[]{AccessType.READ_ONLY, AccessType.NONSTRICT_READ_WRITE, AccessType.READ_WRITE}; }