db4o

MemoryIoAdapter Class

IoAdapter for in-memory operation.

For a list of all members of this type, see MemoryIoAdapter Members.

System.Object
   Db4objects.Db4o.IO.IoAdapter
      Db4objects.Db4o.IO.MemoryIoAdapter

public class MemoryIoAdapter : IoAdapter

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

IoAdapter for in-memory operation.

Configure db4o to operate with this in-memory IoAdapter with

MemoryIoAdapter memoryIoAdapter = new MemoryIoAdapter();
Db4o.configure().io(memoryIoAdapter);



Use the normal #openFile() and #openServer() commands to open ObjectContainers and ObjectServers. The names specified as file names will be used to identify the
byte[]
content of the in-memory files in the _memoryFiles Hashtable in the adapter. After working with an in-memory ObjectContainer/ObjectServer the
byte[]
content is available in the MemoryIoAdapter by using Db4objects.Db4o.IO.MemoryIoAdapter.Get . To add old existing database
byte[]
content to a MemoryIoAdapter use Db4objects.Db4o.IO.MemoryIoAdapter.Put . To reduce memory consumption of memory file names that will no longer be used call Db4objects.Db4o.IO.MemoryIoAdapter.Put and pass an empty byte array.

Requirements

Namespace: Db4objects.Db4o.IO

Assembly: Db4objects.Db4o (in Db4objects.Db4o.dll)

See Also

MemoryIoAdapter Members | Db4objects.Db4o.IO Namespace