org.pentaho.di.repository.Repository.disconnect()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.pentaho.di.repository.Repository.disconnect方法的一些代码示例,展示了Repository.disconnect的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.disconnect方法的具体详情如下:
包路径:org.pentaho.di.repository.Repository
类名称:Repository
方法名:disconnect

Repository.disconnect介绍

[英]Disconnect from the repository.
[中]断开与存储库的连接。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void jobFinished( Job job ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

public void jobFinished( Job job ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

public void jobFinished( Job job ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void transFinished( Trans trans ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void transFinished( Trans trans ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

public void jobFinished( Job job ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void transFinished( Trans trans ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

public void jobFinished( Job job ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void transFinished( Trans trans ) {
  repository.disconnect();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void disconnect() {
 getDelegate().disconnect();
}

代码示例来源:origin: pentaho/pentaho-kettle

@AfterClass
public static void tearDownAfterClass() throws KettleException, IOException {
 if ( repo != null ) {
  repo.disconnect();
 }
 FileUtils.forceDelete( new File( baseDirName.toString() ) );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
  * Resets the repository so that next time {@link #getRepository()} is called a new repository is returned.
  * This is called whenever the user or password is changed for this instance of the repository
  */
 public void reconnectToRepository() {
  if ( this.repository == null ) {
   return;
  }

  if ( this.repository.isConnected() ) {
   this.repository.disconnect();
  }

  try {
   this.repository.connect( this.getUsername(), this.getPassword() );
   this.shouldReconnect = false;
  } catch ( KettleException e ) {
   logger.debug( "Unable to connect to repository \"{}\".", this.repository.getRepositoryMeta().getId() );
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

@Override
public void onSuccess( Repository repository ) {
 // Close previous repository...
 if ( rep != null ) {
  rep.disconnect();
  SpoonPluginManager.getInstance().notifyLifecycleListeners( SpoonLifeCycleEvent.REPOSITORY_DISCONNECTED );
 }
 setRepository( repository );
 loadSessionInformation( repository, true );
 refreshTree();
 setShellText();
 SpoonPluginManager.getInstance().notifyLifecycleListeners( SpoonLifeCycleEvent.REPOSITORY_CONNECTED );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void closeRepository() {
 if ( rep != null ) {
  // Prompt and close all tabs as user disconnected from the repo
  boolean shouldDisconnect = Spoon.getInstance().closeAllJobsAndTransformations( true );
  if ( shouldDisconnect ) {
   loadSessionInformation( null, false );
   if ( rep != null ) {
    rep.disconnect();
   }
   if ( metaStore.getMetaStoreList().size() > 1 ) {
    try {
     metaStore.getMetaStoreList().remove( 0 );
     metaStore.setActiveMetaStoreName( metaStore.getMetaStoreList().get( 0 ).getName() );
    } catch ( MetaStoreException e ) {
     new ErrorDialog( shell, BaseMessages.getString( PKG, "Spoon.ErrorRemovingMetaStore.Title" ),
       BaseMessages.getString( PKG, "Spoon.ErrorRemovingMetaStore.Message" ), e );
    }
   }
   setRepository( null );
   setShellText();
   SpoonPluginManager.getInstance().notifyLifecycleListeners( SpoonLifeCycleEvent.REPOSITORY_DISCONNECTED );
   enableMenus();
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

} finally {
 if ( this.repository != null ) {
  this.repository.disconnect();
  this.repository = null;

代码示例来源:origin: pentaho/pentaho-kettle

job = null;
if ( repository != null ) {
 repository.disconnect();
 repository.disconnect();

代码示例来源:origin: pentaho/pentaho-kettle

e.printStackTrace();
if ( repository != null ) {
 repository.disconnect();
 repository.disconnect();

代码示例来源:origin: pentaho/pentaho-kettle

repos.disconnect();
 repos = null;
} finally {
 if ( repos != null ) {
  repos.disconnect();
  repos = null;

代码示例来源:origin: pentaho/pentaho-kettle

} finally {
 if ( repos != null ) {
  repos.disconnect();
  repos = null;

相关文章

Repository类方法