当前位置: 首页>>代码示例>>Java>>正文


Java SharedObjectInterface.isShared方法代码示例

本文整理汇总了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);
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:JobMeta.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:AbstractMeta.java

示例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;
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:28,代码来源:JobMeta.java

示例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;
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:36,代码来源:TransMeta.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:34,代码来源:TransMeta.java

示例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);
    }
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:42,代码来源:TransMeta.java


注:本文中的org.pentaho.di.shared.SharedObjectInterface.isShared方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。