Neokernel API

FileObjectManager Class

The FileObjectManager manages Props objects and stores them as files in the specified directory using FilePropsContainers. The FilePropsContainer keeps the file on the hard disk in sync with its corresponding Props in memory. To get a Props that is managed by the FileObjectManager, call createObject. The only ObjectType supported by this IObjectManager implementation is the PropsType; using other types will fail.

Props objects can be retrieved by calling getObject with the ObjectID for the desired Props. ObjectIDs can be created from Props like this:

new ObjectID(props.getString("type"),props.getString("id"));
You can list all or a subset of the Props by calling listObjects. The object passed as an argument will be used as a queryObject. If the queryObject is null (Nothing in Visual Basic), all ObjectIDs in this IObjectManager will be listed. If the queryObject is of type ObjectType, all ObjectIDs with the specified type will be returned. If queryObject is a Pair, an ObjectID will be returned for a Props that includes a prop name matching the string First and a prop value matching to the string Pair.second(). Props objects are removed by calling removeObject with the ObjectID of the object to be removed.

The Props objects stored in the FileObjectManager are cached in a Hashtable called allprops using their ObjectIDs as keys. The id prop of each Props is appended to its filename on disk, i.e. prop001 is the filename of the Prop with an id of 1.

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

System.Object
   Props
      Agent
         ServiceAgent
            FileObjectManager

public class FileObjectManager : ServiceAgent, IObjectManager

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.

Requirements

Namespace: com.neokernel.om

Assembly: Neokernel (in Neokernel.exe)

See Also

FileObjectManager Members | com.neokernel.om Namespace | Props | FilePropsContainer | ObjectID | ObjectType