jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: Is SwiftApi is thread safe?
Date Thu, 24 Dec 2015 09:16:15 GMT
Hi!

It should be thread-safe, so you should be able to reuse it. Just take into
account that you'll have to close it when you're done.

I.
El 22/12/2015 6:23, "Kiran Singh" <kim.singh15@gmail.com> escribió:

> Hi
>
> My name is Kiran Singh and i am using jCloud openstacks-swift library to
> connect with Swift server. I want to write a multi-threaded application.
>
> For making connection to swift server i am using following code:
>
> SwiftApi swiftApi = ContextBuilder.newBuilder(provider)
>                 .endpoint(endUrl)
>                 .credentials(identity, credential)
>                 .buildApi(SwiftApi.class);
>
> My question is SwiftApi is thread safe?
>
> Can i use Singleton object of swiftApi for each thread or do i need to
> create swiftApi object for each thread?
>
> Thanks in advance
> Kiran Singh
>

Mime
View raw message