本文整理汇总了Java中org.pentaho.di.shared.SharedObjectInterface.isShared方法的典型用法代码示例。如果您正苦于以下问题:Java SharedObjectInterface.isShared方法的具体用法?Java SharedObjectInterface.isShared怎么用?Java SharedObjectInterface.isShared使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.shared.SharedObjectInterface
的用法示例。
在下文中一共展示了SharedObjectInterface.isShared方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
public void saveSharedObjects() throws KettleException {
try {
// First load all the shared objects...
String soFile = environmentSubstitute(sharedObjectsFile);
SharedObjects sharedObjects = new SharedObjects(soFile);
// Now overwrite the objects in there
List<Object> shared = new ArrayList<Object>();
shared.addAll(databases);
shared.addAll(slaveServers);
// The databases connections...
for (int i = 0; i < shared.size(); i++) {
SharedObjectInterface sharedObject = (SharedObjectInterface) shared.get(i);
if (sharedObject.isShared()) {
sharedObjects.storeObject(sharedObject);
}
}
// Save the objects
sharedObjects.saveToFile();
} catch (Exception e) {
throw new KettleException("Unable to save shared ojects", e);
}
}
示例2: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
public void saveSharedObjects() throws KettleException {
try {
// Load all the shared objects...
String soFile = environmentSubstitute( sharedObjectsFile );
SharedObjects sharedObjects = new SharedObjects( soFile );
// in-memory shared objects are supposed to be in sync, discard those on file to allow edit/delete
sharedObjects.setObjectsMap( new Hashtable<>() );
for ( SharedObjectInterface sharedObject : getAllSharedObjects() ) {
if ( sharedObject.isShared() ) {
sharedObjects.storeObject( sharedObject );
}
}
sharedObjects.saveToFile();
} catch ( Exception e ) {
throw new KettleException( "Unable to save shared ojects", e );
}
}
示例3: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
public boolean saveSharedObjects() {
try {
// First load all the shared objects...
String soFile = environmentSubstitute(sharedObjectsFile);
SharedObjects sharedObjects = new SharedObjects(soFile);
// Now overwrite the objects in there
List<Object> shared = new ArrayList<Object>();
shared.addAll(databases);
shared.addAll(slaveServers);
// The databases connections...
for (int i = 0; i < shared.size(); i++) {
SharedObjectInterface sharedObject = (SharedObjectInterface) shared.get(i);
if (sharedObject.isShared()) {
sharedObjects.storeObject(sharedObject);
}
}
// Save the objects
sharedObjects.saveToFile();
return true;
} catch (Exception e) {
log.logError(toString(), "Unable to save shared ojects: " + e.toString());
return false;
}
}
示例4: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
public boolean saveSharedObjects()
{
try
{
// First load all the shared objects...
String soFile = environmentSubstitute(sharedObjectsFile);
SharedObjects sharedObjects = new SharedObjects(soFile);
// Now overwrite the objects in there
List<SharedObjectInterface> shared = new ArrayList<SharedObjectInterface>();
shared.addAll(databases);
shared.addAll(steps);
shared.addAll(partitionSchemas);
shared.addAll(slaveServers);
shared.addAll(clusterSchemas);
// The databases connections...
for (SharedObjectInterface sharedObject : shared )
{
if (sharedObject.isShared())
{
sharedObjects.storeObject(sharedObject);
}
}
// Save the objects
sharedObjects.saveToFile();
return true;
}
catch(Exception e)
{
log.logError(toString(), "Unable to save shared ojects: "+e.toString());
return false;
}
}
示例5: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
public void saveSharedObjects() throws KettleException
{
try
{
// First load all the shared objects...
String soFile = environmentSubstitute(sharedObjectsFile);
SharedObjects sharedObjects = new SharedObjects(soFile);
// Now overwrite the objects in there
List<SharedObjectInterface> shared = new ArrayList<SharedObjectInterface>();
shared.addAll(databases);
shared.addAll(steps);
shared.addAll(partitionSchemas);
shared.addAll(slaveServers);
shared.addAll(clusterSchemas);
// The databases connections...
for (SharedObjectInterface sharedObject : shared )
{
if (sharedObject.isShared())
{
sharedObjects.storeObject(sharedObject);
}
}
// Save the objects
sharedObjects.saveToFile();
}
catch(Exception e)
{
throw new KettleException("Unable to save shared ojects", e);
}
}
示例6: saveSharedObjects
import org.pentaho.di.shared.SharedObjectInterface; //导入方法依赖的package包/类
/**
* Save shared objects, including databases, steps, partition schemas, slave servers, and
* cluster schemas, to a file
*
* @throws KettleException the kettle exception
* @see org.pentaho.di.core.EngineMetaInterface#saveSharedObjects()
* @see org.pentaho.di.shared.SharedObjects#saveToFile()
*/
public void saveSharedObjects() throws KettleException
{
try
{
// First load all the shared objects...
String soFile = environmentSubstitute(sharedObjectsFile);
SharedObjects sharedObjects = new SharedObjects(soFile);
// Now overwrite the objects in there
List<SharedObjectInterface> shared = new ArrayList<SharedObjectInterface>();
shared.addAll(databases);
shared.addAll(steps);
shared.addAll(partitionSchemas);
shared.addAll(slaveServers);
shared.addAll(clusterSchemas);
// The databases connections...
for (SharedObjectInterface sharedObject : shared )
{
if (sharedObject.isShared())
{
sharedObjects.storeObject(sharedObject);
}
}
// Save the objects
sharedObjects.saveToFile();
}
catch(Exception e)
{
throw new KettleException("Unable to save shared ojects", e);
}
}