131.3. Atomic 번호 생산자 -
이 생산자의 작업은 * setvalue (set the number with a given value) * get * increase (+1) * 감소 (-1) * 제거입니다.
요청 메시지의 헤더 변수:
이름 | 유형 | 설명 |
---|---|---|
|
| 유효한 값은 setvalue, get, increase, decrease, destroy입니다. |
131.3.1. 설정 샘플:
Java DSL:
from("direct:set") .setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.SET_VALUE)) .toF("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX);
Spring DSL:
<route> <from uri="direct:set" /> <!-- If using version 2.8 and above set headerName to "CamelHazelcastOperationType" --> <setHeader headerName="hazelcast.operation.type"> <constant>setvalue</constant> </setHeader> <to uri="hazelcast-atomicvalue:foo" /> </route>
메시지 본문 내에 설정할 값을 제공합니다(여기서 값은 10): template.sendBody("direct:set", 10
).