블로그 이미지
개발 블로그였지만 맛집을 더 많이 올리고있어서 잡동사니로 재 명명함ㅋㅋ 꽃현주

카테고리

분류 전체보기 (24)
Essay (1)
Development (12)
Tip/Info (8)
Book (1)
Item (2)
Total
Today
Yesterday

'Aggregator'에 해당되는 글 1건

  1. 2014.01.22 Aggregator 2

Aggregator

Development/Cascading / 2014. 1. 22. 23:00

Aggregator에서 필수로 구현해야되는 start method 에서 보통 setContext에 들어 갈 자료형을 생성하는데 

이 때  aggregatorCall.getContext() == null 이 아닐 경우 Context를 꼭 clear 해 줘야 한다. 

Aggregator의 Context가 재사용 되면서 값이 꼬인다.   


public void start(FlowProcess flowProcess, AggregatorCall<HashMap<String, Long>> aggregatorCall) {

        if (aggregatorCall.getContext() == null) {

            aggregatorCall.setContext(new HashMap<String, Long>());

        } else {

            aggregatorCall.getContext().clear();

        }

    }

'Development > Cascading' 카테고리의 다른 글

[cascading] TemplateTap deprecated !!  (0) 2014.10.08
About Cascading?  (0) 2014.02.03
Posted by 꽃현주
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함