ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: setAtomicSequenceReserveSize(0) doesnt work. It reserves a minimum of 2.
Date Fri, 18 Nov 2016 20:21:13 GMT
Hi,

Please properly subscribe to the mailing list so that the community can
receive email notifications for your messages. To subscribe, send empty
email to user-subscribe@ignite.apache.org and follow simple instructions in
the reply.


Rashmika wrote
> AtomicConfiguration a = new AtomicConfiguration();
>  a.setAtomicSequenceReserveSize(0);
>  cfg.setAtomicConfiguration(a);
> 
> (or)
>  a.setAtomicSequenceReserveSize(1);
> (or)
>  a.setAtomicSequenceReserveSize(2);
> 
> behaves the same way. Inspite of setting reserve size to 0 or 1, it
> reserves a minimum of 2.
> 
> How to reduce the reserve size to 1?

You should use IgniteAtomicLong for this. It doesn't have ranges and makes a
global update each time you increment. Keep in mind though that this is not
free and IgniteAtomicSequence is much faster.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/setAtomicSequenceReserveSize-0-doesnt-work-It-reserves-a-minimum-of-2-tp9065p9088.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message