Examples of LockMode


Examples of com.sleepycat.db.LockMode

            autoCommit = true;
        }

        boolean failed = true;
        Cursor cursor = db.openCursor(txn, null);
        LockMode lockMode = locking ? LockMode.RMW : null;
        try {
            while (true) {
                OperationStatus status =
                    cursor.getSearchKey(keyEntry, dataEntry, lockMode);
                if (status == OperationStatus.SUCCESS) {
View Full Code Here

Examples of com.sleepycat.je.LockMode

    public BdbRuntimeConfig() {

    }

    public BdbRuntimeConfig(VoldemortConfig config) {
        LockMode lockMode = config.getBdbReadUncommitted() ? LockMode.READ_UNCOMMITTED
                                                          : LockMode.DEFAULT;
        setLockMode(lockMode);
        setStatsCacheTtlMs(config.getBdbStatsCacheTtlMs());
        setExposeSpaceUtil(config.getBdbExposeSpaceUtilization());
        setMinimizeScanImpact(config.getBdbMinimizeScanImpact());
View Full Code Here

Examples of org.hibernate.LockMode

    String entityName = HbmBinder.getEntityName(returnElem, mappings);
    if(entityName==null) {
      throw new MappingException( "<return alias='" + alias + "'> must specify either a class or entity-name");
    }
    LockMode lockMode = getLockMode( returnElem.attributeValue( "lock-mode" ) );

    PersistentClass pc = mappings.getClass( entityName );
    java.util.Map propertyResults = bindPropertyResults(alias, returnElem, pc, mappings );

    return new NativeSQLQueryRootReturn(
View Full Code Here

Examples of org.hibernate.LockMode

  }

  private static NativeSQLQueryJoinReturn bindReturnJoin(Element returnElem, Mappings mappings) {
    String alias = returnElem.attributeValue( "alias" );
    String roleAttribute = returnElem.attributeValue( "property" );
    LockMode lockMode = getLockMode( returnElem.attributeValue( "lock-mode" ) );
    int dot = roleAttribute.lastIndexOf( '.' );
    if ( dot == -1 ) {
      throw new MappingException(
          "Role attribute for sql query return [alias=" + alias +
          "] not formatted correctly {owningAlias.propertyName}"
View Full Code Here

Examples of org.hibernate.LockMode

  }

  private static NativeSQLQueryCollectionReturn bindLoadCollection(Element returnElem, Mappings mappings) {
    String alias = returnElem.attributeValue( "alias" );
    String collectionAttribute = returnElem.attributeValue( "role" );
    LockMode lockMode = getLockMode( returnElem.attributeValue( "lock-mode" ) );
    int dot = collectionAttribute.lastIndexOf( '.' );
    if ( dot == -1 ) {
      throw new MappingException(
          "Collection attribute for sql query return [alias=" + alias +
          "] not formatted correctly {OwnerClassName.propertyName}"
View Full Code Here

Examples of org.hibernate.LockMode

    if ( lockOptions.getAliasLockCount() == 0
        && ( lockOptions.getLockMode() == null || LockMode.NONE.equals( lockOptions.getLockMode() ) ) ) {
      return defaultLockModes;
    }
    //FIXME fix the alias issue: could be that the "default" lock mode in LockOptions does that already
    LockMode lockMode = lockOptions.getEffectiveLockMode( "dummyaliasaswedon'thaveany" );
    if ( lockMode == null ) {
      //NONE, because its the requested lock mode, not the actual!
      lockMode = LockMode.NONE;
    }
    return new LockMode[] { lockMode };
View Full Code Here

Examples of org.hibernate.LockMode

    //need to hydrate it.

    // grab its state from the ResultSet and keep it in the Session
    // (but don't yet initialize the object itself)
    // note that we acquire LockMode.READ even if it was not requested
    LockMode acquiredLockMode = lockMode == LockMode.NONE ? LockMode.READ : lockMode;
    loadFromResultSet(
        resultset,
        i,
        object,
        instanceClass,
View Full Code Here

Examples of org.hibernate.LockMode

   *
   * @param lockOptions contains the lock mode to apply.
   * @return The appropriate for update fragment.
   */
  public String getForUpdateString(LockOptions lockOptions) {
        LockMode lockMode = lockOptions.getLockMode();
        return getForUpdateString( lockMode, lockOptions.getTimeOut() );
  }
View Full Code Here

Examples of org.hibernate.LockMode

      lockModes.put( getSQLAlias( subcriteria ), me.getValue() );
    }
    iter = rootCriteria.iterateSubcriteria();
    while ( iter.hasNext() ) {
      CriteriaImpl.Subcriteria subcriteria = ( CriteriaImpl.Subcriteria ) iter.next();
      LockMode lm = subcriteria.getLockMode();
      if ( lm != null ) {
        lockModes.put( getSQLAlias( subcriteria ), lm );
      }
    }
View Full Code Here

Examples of org.hibernate.LockMode

    final Map aliasedLockModes = new HashMap();
    final Map keyColumnNames = dialect.forUpdateOfColumns() ? new HashMap() : null;
    final String[] drivingSqlAliases = getAliases();
    for ( int i = 0; i < drivingSqlAliases.length; i++ ) {
      final LockMode lockMode = ( LockMode ) lockModes.get( drivingSqlAliases[i] );
      if ( lockMode != null ) {
        final Lockable drivingPersister = ( Lockable ) getEntityPersisters()[i];
        final String rootSqlAlias = drivingPersister.getRootTableAlias( drivingSqlAliases[i] );
        aliasedLockModes.put( rootSqlAlias, lockMode );
        if ( keyColumnNames != null ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.