iitb.con.util
Interface FreeSpaceList

All Known Implementing Classes:
ArrayFreeSpaceList

public interface FreeSpaceList

FreeSpaceList is the list which maintains the information about the free blocks in a file.


Method Summary
 void close()
          Closes the free space list file
 void commit()
          Commits the changes to the free space list file
 boolean freeTheBlock(long location, long size)
          Frees the specified block in the file
 long getFreeBlock(long size)
          Returns the free block location
 

Method Detail

close

void close()
           throws java.io.IOException
Closes the free space list file

Throws:
java.io.IOException - if file operation fails

commit

void commit()
            throws java.io.IOException
Commits the changes to the free space list file

Throws:
java.io.IOException - if file operation fails

freeTheBlock

boolean freeTheBlock(long location,
                     long size)
Frees the specified block in the file

Parameters:
location - block location
size - block size
Returns:
true on success

getFreeBlock

long getFreeBlock(long size)
Returns the free block location

Parameters:
size - request block size
Returns:
free block location