db4o |

# MemoryIoAdapter Class

IoAdapter for in-memory operation.

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

System.Object
com.db4o.io.IoAdapter
com.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 com.db4o.io.MemoryIoAdapter.Get . To add old existing database

    byte[]

content to a MemoryIoAdapter use com.db4o.io.MemoryIoAdapter.Put . To reduce memory consumption of memory file names that will no longer be used call com.db4o.io.MemoryIoAdapter.Put and pass an empty byte array.

#### Requirements

Namespace: com.db4o.io

Assembly: db4o (in db4o.dll)

#### See Also

MemoryIoAdapter Members | com.db4o.io Namespace