Package com.db4o.internal
Class SystemInfoFileImpl
- java.lang.Object
-
- com.db4o.internal.SystemInfoFileImpl
-
- All Implemented Interfaces:
SystemInfo
public class SystemInfoFileImpl extends java.lang.Object implements SystemInfo
-
-
Constructor Summary
Constructors Constructor Description SystemInfoFileImpl(LocalObjectContainer file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
freespaceEntryCount()
returns the number of entries in the Freespace Manager.long
freespaceSize()
returns the freespace size in the database in bytes.long
totalSize()
Returns the total size of the database on disk.
-
-
-
Constructor Detail
-
SystemInfoFileImpl
public SystemInfoFileImpl(LocalObjectContainer file)
-
-
Method Detail
-
freespaceEntryCount
public int freespaceEntryCount()
Description copied from interface:SystemInfo
returns the number of entries in the Freespace Manager.
A high value for the number of freespace entries is an indication that the database is fragmented and that defragment should be run.- Specified by:
freespaceEntryCount
in interfaceSystemInfo
- Returns:
- the number of entries in the Freespace Manager.
-
freespaceSize
public long freespaceSize()
Description copied from interface:SystemInfo
returns the freespace size in the database in bytes.
When db4o stores modified objects, it allocates a new slot for it. During commit the old slot is freed. Free slots are collected in the freespace manager, so they can be reused for other objects.
This method returns a sum of the size of all free slots in the database file.
To reclaim freespace run defragment.- Specified by:
freespaceSize
in interfaceSystemInfo
- Returns:
- the freespace size in the database in bytes.
-
totalSize
public long totalSize()
Description copied from interface:SystemInfo
Returns the total size of the database on disk.- Specified by:
totalSize
in interfaceSystemInfo
- Returns:
- total size of database on disk
-
-