ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergi Vladykin <sergi.vlady...@gmail.com>
Subject Re: Why IgniteAtomicLong is Closeable?
Date Fri, 18 Sep 2015 16:03:54 GMT
Agree, really strange. Even method close() without Closeable looks
meaningless,
if there is method removed() then it must have paired method remove() but
not close().

Sergi

2015-09-18 17:22 GMT+03:00 Vladimir Ozerov <vozerov@gridgain.com>:

> Igniters,
>
> IgniteAtomicLong extends "Closeable" interface. Why? This appears to be
> wrong, because normally user expects that Closeable/AutoCloseable resources
> are used as follows:
>
> try (Resource r = ...) {
>     ...
> }
>
> For IgniteAtomicLong it means creation with immedaite destroy, definitely
> not what user expects. I think we must remove "extend Closeable" from all
> atomic classes and simply leave "close()" method which cannot be used with
> try-with-resources idiom.
>
> Thoughts?
>
> Vladimir.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message