public class EgovPartitionFlatFileItemWriter<T>
extends org.springframework.batch.item.util.ExecutionContextUserSupport
implements org.springframework.batch.item.file.ResourceAwareItemWriterItemStream<T>, org.springframework.beans.factory.InitializingBean
<< 개정이력(Modification Information) >> 수정일 수정자 수정내용 ------- -------- --------------------------- 2012. 07.30 배치실행개발팀 최초 생성
| Constructor and Description |
|---|
EgovPartitionFlatFileItemWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
설정파일의 프로퍼티를 셋팅
|
void |
close()
Close 수행
state 의 상태와 fileCount 상태를 판단 후 최종 state를 Close 함
여러 쓰레드에서 접근하게 되므로 synchronized 로 선점권 보장
|
void |
open(org.springframework.batch.item.ExecutionContext executionContext)
open 수행
파일을 쓰기 위해서 state 상태를 판단 후 존재하지 않으면 doOpen 호출
여러 쓰레드에서 접근하게 되므로 synchronized 로 선점권 보장
|
void |
setAppendAllowed(boolean append) |
void |
setEncoding(String newEncoding)
encoding 셋팅
|
void |
setFileCount(int fileCount)
fileCount 셋팅
|
void |
setFooterCallback(org.springframework.batch.item.file.FlatFileFooterCallback footerCallback)
footerCallback will be called after writing the last item to file, but
before the file is closed.
|
void |
setHeaderCallback(org.springframework.batch.item.file.FlatFileHeaderCallback headerCallback)
headerCallback will be called before writing the first item to file.
|
void |
setLineAggregator(org.springframework.batch.item.file.transform.LineAggregator<T> lineAggregator)
lineAggregator 셋팅
|
void |
setLineSeparator(String lineSeparator)
lineSeparator 셋팅
|
void |
setResource(org.springframework.core.io.Resource resource)
resource 셋팅
|
void |
setSaveState(boolean saveState)
saveState 셋팅
|
void |
setShouldDeleteIfEmpty(boolean shouldDeleteIfEmpty)
shouldDeleteIfEmpty the flag value to set
|
void |
setShouldDeleteIfExists(boolean shouldDeleteIfExists)
shouldDeleteIfExists 셋팅
|
void |
setTransactional(boolean transactional)
transactional 셋팅
|
void |
update(org.springframework.batch.item.ExecutionContext executionContext)
state의 상태를 갱신하고 다음에 쓰여질 position을 지정
|
void |
write(List<? extends T> items)
Write 수행
기존의 state 의 상태를 얻어와 이어서 Write 수행
여러 쓰레드에서 접근하게 되므로 synchronized 로 선점권 보장
|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setLineSeparator(String lineSeparator)
lineSeparator - public void setLineAggregator(org.springframework.batch.item.file.transform.LineAggregator<T> lineAggregator)
lineAggregator - public void setFileCount(int fileCount)
fileCount - public void setResource(org.springframework.core.io.Resource resource)
setResource in interface org.springframework.batch.item.file.ResourceAwareItemWriterItemStream<T>public void setEncoding(String newEncoding)
public void setShouldDeleteIfExists(boolean shouldDeleteIfExists)
public void setAppendAllowed(boolean append)
public void setShouldDeleteIfEmpty(boolean shouldDeleteIfEmpty)
public void setSaveState(boolean saveState)
public void setHeaderCallback(org.springframework.batch.item.file.FlatFileHeaderCallback headerCallback)
public void setFooterCallback(org.springframework.batch.item.file.FlatFileFooterCallback footerCallback)
public void setTransactional(boolean transactional)
public void write(List<? extends T> items) throws Exception
public void close()
close in interface org.springframework.batch.item.ItemStreamItemStream#close()public void open(org.springframework.batch.item.ExecutionContext executionContext)
throws org.springframework.batch.item.ItemStreamException
open in interface org.springframework.batch.item.ItemStreamorg.springframework.batch.item.ItemStreamExceptionItemStream#close()public void update(org.springframework.batch.item.ExecutionContext executionContext)
update in interface org.springframework.batch.item.ItemStreamItemStream#update(ExecutionContext)Copyright © 2015. All rights reserved.