WebSphere Extended Deployment Compute Grid, Version 6.1.1
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows,


ByteWriterPattern

このパターンは、ファイルにバイト・データを書き込む場合に使用されます。

サポート・クラス

  • FileByteWriter

必須プロパティー

表 1. 必須プロパティー
プロパティー名
PATTERN_IMPL_CLASS ByteWriterPattern インターフェースを実装するクラス
FILENAME 入力ファイルの完全なパス

オプションのプロパティー

表 2. オプションのプロパティー
プロパティー名 説明

debug

true または false (デフォルトは false)

このバッチ・データ・ストリームに対する詳細トレースを使用可能にします。

EnablePerformanceMeasurement

true または false (デフォルトは false)

GenericXDBatchStep を使用している場合に、バッチ・データ・ストリームおよび processRecord メソッドにかかった合計時間を計算します。

EnableDetailedPerformanceMeasurement

true または false (デフォルトは false)

バッチ・データ・ストリームの各メソッドにかかった時間の詳細を提供します。

file.encoding

ファイルのエンコード

例えば、8859_1 など。

AppendJobldToFileName

true または false (デフォルトは false)

ファイルのロード前にジョブ ID をファイル名に追加します。

インターフェース定義

public interface ByteWriterPattern {
  
	/**  
	 * Invoked during the step setup phase  
	 * @param props
	 */  
	public void initialize(Properties props);
	  
	/**  
	 * Writes the given object onto the given outputstream. Any processing  
	 * that needs to be done before writing can be added here   
	 * @param out  
	 * @param record
	 * @throws IOException
	 */  
	public void writeRecord(BufferedOutputStream out, Object record) throws IOException;
	  
	/**  
	 * Write header information if any  
	 * @param out  
	 * @throws IOException
	 */  
	public void writeHeader(BufferedOutputStream out) throws IOException;

         /**
	 * This method can be optionally called during process step to explicity 
	 * initialize and write the header. 
	 * @param header
	 */
	public void writeHeader(BufferedOutputStream out, Object header) throws IOException;
}  

xJCL の例

<batch-data-streams>		 		 
<bds>
<logical-name>outputStream</logical-name>
<props>
     <prop name="PATTERN_IMPL_CLASS" value="com.ibm.websphere.batch.samples.tests.bds.EchoWriter"/>
     <prop name="file.encoding" value="8859_1"/>
     <prop name="FILENAME" value="/opt/txlist.txt" />
     <prop name="debug" value="true"/>
</props>
<impl-class>com.ibm.websphere.batch.devframework.datastreams.patterns.FileByteWriter</impl-class>
</bds>
</batch-data-streams>	        



関連概念
バッチ・データ・ストリームのフレームワークとパターン
関連情報
JDBCReaderPattern
JDBCWriterPattern
FileReaderPattern
FileWriterPattern
RecordOrientedDatasetReaderPattern
JPAReaderPattern
JPAWriterPattern
参照トピック    

ご利用条件 | フィードバック

最終更新: 2009/09/17 16時38分56秒EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.gridmgr.doc/info/scheduler/rbtchpttrn4.html