db4o 7.4

com.db4o.ext
Interface SystemInfo


public interface SystemInfo

provides information about system state and system settings.


Method Summary
 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.
 

Method Detail

freespaceEntryCount

int freespaceEntryCount()
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.

Returns:
the number of entries in the Freespace Manager.

freespaceSize

long freespaceSize()
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.

Returns:
the freespace size in the database in bytes.

totalSize

long totalSize()
Returns the total size of the database on disk.

Returns:
total size of database on disk

db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.