Neokernel API

com.neokernel.om Namespace

Namespace Hierarchy

Classes

Class Description
AgentServer A server interface to the neokernel.
FileObjectBlock This class is used to serialize Objects into a file prepared by FileObjectStore. The store returns a reference to a block in the file that Objects can be written to and read from. A FileObjectBlock can be provided with a header description (an Object) as well as the Object to be stored in the body of the block. If the Object to be stored in the body of the block exceeds the length of the block, a new block is allocated and the remaining bytes of the object are stored there. When the next block is used up, it allocates a new one from the FileObjectStore, and so on. When extra blocks in chain of blocks are no longer needed, they are disposed of.
FileObjectManager

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.

FileObjectStore This class takes a File and partitions it into FileObjectBlocks. It will keep track of free blocks and allocate new blocks if needed.
FilePropsContainer The FilePropsContainer is an IPropsContainer that stores all of it's Props in one file on the disk. When Props are changed, a new file is written.
ObjectID This class uniquely identifies an Object contained within an ObjectManager.
ObjectManager This is a reference implementation of a non-persistent IObjectManager implemented as an agent. Normal operations are reported through debug for educational purposes. If you are using it in production, set the hide_debug prop to true for significantly faster performance.
ObjectType This class represents a type of object recognized by the Object Manager.
PropsQuery This is an ObjectQuery for querying Props objects. It is used to list objects in an IObjectManager using the listObjects method. The IObjectManager must support PropsTypes for PropsQuery features to work properly.
PropsType This is an IObjectManager type. An IObjectManager with support for PropsType can be used to create and manage Props. This Object is used when creating new objects with createObject and when fetching them by helping to create the correct ObjectID.
SessionManager This agent is the reference implementation of the SessionManagerInterface.
SessionReaper

The SessionReaper is a ScheduledAgent that periodically checks for expired sessions created by the SessionManager. Although this agent has no direct interactions with the SessionManager, it knows that session information stored in an IObjectManager is tagged with a prop called timestamp. Any session Props that has a timestamp value greater than the SessionReaper's session_timeout_ms prop is removed from the ObjectManager. The SessionReaper checks for expired objects using the schedule, ObjectManager service, and session object type specified by it's Props.

This agent supports the following Props entries:
schedule
The schedule specifying when this agent will check for expired sessions. The default value is between 0:0:0-23:59:59 every 5m
session_type
The object type that should be used to identify for expired session objects. Defaults to session
om_service_name
Specifies the name of the Object Manager service that the persistent sessions are stored in. Defaults to object_manager
session_timeout_ms
Specifies the time in milliseconds that sessions will persist before they are reaped. Defaults to 300000 (5 minutes).

Interfaces

Interface Description
IAgentServerInterface A standard server interface for managing agents in a Neokernel using an IObjectManager to store the agent's Props.
IObjectManager  
SessionManagerInterface Standard interface for managing session information accessible using Props.

Structures

Structure Description
IObjectManager_Fields This is the generic interface for an Object Manager.