コード例 #1
0
  public CollectionRegionAccessStrategy buildAccessStrategy(AccessType accessType)
      throws CacheException {
    if (AccessType.READ_ONLY.equals(accessType) || AccessType.TRANSACTIONAL.equals(accessType))
      return new TransactionalAccess(this);

    throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
  }
コード例 #2
0
 @Override
 public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType)
     throws CacheException {
   if (AccessType.READ_ONLY.equals(accessType)) {
     return new ReadOnlyAccess(this);
   } else if (AccessType.TRANSACTIONAL.equals(accessType)) {
     return new TransactionalAccess(this);
   }
   throw new CacheException("Unsupported access type [" + accessType.getExternalName() + "]");
 }