Skip to main content

is tilecache shared among threads?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
darwinjob
Offline
Joined: 2004-11-16

TileCache cache = JAI.getDefaultInstance().getTileCache();
cache.setMemoryCapacity(size);

Is this one shared among the different threads? Or should I set the capacity per thread?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rgd
Offline
Joined: 2005-08-23

I believe it's shared but try it - set it in one thread and get it in another.

-Bob

Sent from my iPhone

On Jan 31, 2012, at 12:23 AM, forums@java.net wrote:

> TileCache cache = JAI.getDefaultInstance().getTileCache();
> cache.setMemoryCapacity(size);
>
> Is this one shared among the different threads? Or should I set the capacity
> per thread?
>
>

darwinjob
Offline
Joined: 2004-11-16

Seems to be shared. I set it to a certain in the main thread, the the new spawn thread has the same value (not the default one).