Hi Ali,
Well, you can either keep it in memory (ConcurrentHashMap)/cache or persist
it in disk/database. Either ways, as long as you don't modify the token (or
can't modify the token), it is a read only operation with no writes, so it
is thread safe without any need for additional synchronized blocks.

Refer to Brian Goetz's
<http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601>
book. An excellent read on this topic.



- Nasir

On Thu, May 12, 2016 at 11:19 AM, Ali Akhtar <[email protected]> wrote:

> The method
> public synchronized getToken
>
> is a part of GooglePlayClient as well, despite the extra closing brace
> above it (typo).
>
> --
> You received this message because you are subscribed to the Google Groups
> "dropwizard-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to