True... I'll make that change too.
Mike
On Fri, Nov 27, 2009 at 12:56 PM, Jason Rutherglen
wrote:
> If syncing on directory is not important, then sizeInBytes can be an
> AtomicLong?
>
> On Fri, Nov 27, 2009 at 8:37 AM, Michael McCandless
> wrote:
>> RAMFile has this method:
>>
>> final synch
If syncing on directory is not important, then sizeInBytes can be an AtomicLong?
On Fri, Nov 27, 2009 at 8:37 AM, Michael McCandless
wrote:
> RAMFile has this method:
>
> final synchronized byte[] addBuffer(int size) {
> byte[] buffer = newBuffer(size);
> if (directory!=null)
> synchr
RAMFile has this method:
final synchronized byte[] addBuffer(int size) {
byte[] buffer = newBuffer(size);
if (directory!=null)
synchronized (directory) { // Ensure addition of
buffer and adjustment to directory size are atomic wrt directory
buffers.add(buffer);