else if ( lockMode == LockMode.PESSIMISTIC_READ ) {
// TODO find a more efficient pessimistic read
return new InfinispanPessimisticWriteLockingStrategy( lockable, lockMode );
}
else if ( lockMode == LockMode.OPTIMISTIC ) {
return new OptimisticLockingStrategy( lockable, lockMode );
}
else if ( lockMode == LockMode.OPTIMISTIC_FORCE_INCREMENT ) {
return new OptimisticForceIncrementLockingStrategy( lockable, lockMode );
}
throw new UnsupportedOperationException( "LockMode " + lockMode