Sirikata
|
An implementation of ObjectQueryProcessor that manually manages a cut on the space servers' data structures, creates and manages a local replica of the servers' data structure, and locally executes queries over that data structure. More...
#include <ManualObjectQueryProcessor.hpp>
An implementation of ObjectQueryProcessor that manually manages a cut on the space servers' data structures, creates and manages a local replica of the servers' data structure, and locally executes queries over that data structure.
typedef std::tr1::shared_ptr<ObjectQueryHandler> Sirikata::OH::Manual::ManualObjectQueryProcessor::ObjectQueryHandlerPtr [private] |
typedef std::tr1::unordered_map<SpaceObjectReference, ObjectState, SpaceObjectReference::Hasher> Sirikata::OH::Manual::ManualObjectQueryProcessor::ObjectStateMap [private] |
typedef std::tr1::unordered_map<OHDP::SpaceNodeID, ObjectQueryHandlerPtr, OHDP::SpaceNodeID::Hasher> Sirikata::OH::Manual::ManualObjectQueryProcessor::QueryHandlerMap [private] |
Sirikata::OH::Manual::ManualObjectQueryProcessor::ManualObjectQueryProcessor | ( | ObjectHostContext * | ctx | ) |
Referenced by create().
Sirikata::OH::Manual::ManualObjectQueryProcessor::~ManualObjectQueryProcessor | ( | ) | [virtual] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandForceRebuild | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
References lookupCommandHandler().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandListHandlers | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandListNodes | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
References lookupCommandHandler().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandListQueriers | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandProperties | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::commandStats | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | [private, virtual] |
References Sirikata::Command::EmptyResult(), and Sirikata::Command::Commander::result().
String Sirikata::OH::Manual::ManualObjectQueryProcessor::connectRequest | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef, | ||
const String & | query | ||
) | [virtual] |
Request a query during connection.
This is used by the object host to inform the ObjectQueryProcessor that the object wants to connect with the given query. This gives a chance to filter the query before it is passed to the space. However, the query processor should *not* start processing it until the object has been successfully connected to the space. The default implementation is a noop.
ho | the HostedObject requesting connection |
sporef | the ID of the presence requesting connection |
query | the query requested |
Reimplemented from Sirikata::OH::ObjectQueryProcessor.
References mObjectState.
ManualObjectQueryProcessor * Sirikata::OH::Manual::ManualObjectQueryProcessor::create | ( | ObjectHostContext * | ctx, |
const String & | args | ||
) | [static] |
References ManualObjectQueryProcessor().
Referenced by init().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::createdReplicatedIndex | ( | const OHDP::SpaceNodeID & | snid, |
ProxIndexID | iid, | ||
ReplicatedLocationServiceCachePtr | loc_cache, | ||
ServerID | objects_from_server, | ||
bool | dynamic_objects | ||
) |
References mObjectQueryHandlers.
Referenced by Sirikata::OH::Manual::ServerQueryHandler::onCreatedReplicatedIndex().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::createdServerQuery | ( | const OHDP::SpaceNodeID & | snid | ) |
References mContext, mObjectQueryHandlers, and mStrand.
Referenced by Sirikata::OH::Manual::ServerQueryHandler::onSpaceNodeSession().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::deliverLocationResult | ( | const SpaceObjectReference & | sporef, |
const LocUpdate & | lu | ||
) |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::deliverProximityResult | ( | const SpaceObjectReference & | sporef, |
const Sirikata::Protocol::Prox::ProximityUpdate & | update | ||
) |
References Sirikata::OH::ObjectQueryProcessor::deliverProximityUpdate(), and mObjectState.
Referenced by Sirikata::OH::Manual::ObjectQueryHandler::handleDeliverEvents().
ManualObjectQueryProcessor::ObjectQueryHandlerPtr Sirikata::OH::Manual::ManualObjectQueryProcessor::lookupCommandHandler | ( | const Command::Command & | cmd, |
Command::Commander * | cmdr, | ||
Command::CommandID | cmdid | ||
) | const [private] |
References Sirikata::Command::EmptyResult(), mObjectQueryHandlers, and Sirikata::Command::Commander::result().
Referenced by commandForceRebuild(), and commandListNodes().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::onObjectNodeSession | ( | const SpaceID & | space, |
const ObjectReference & | sporef, | ||
const OHDP::NodeID & | id | ||
) | [virtual] |
Invoked when an object begins a session with the given space server node.
Upon invokation, previous sessions should be considered closed. A null NodeID indicates disconnection from the space.
Reimplemented from Sirikata::ObjectNodeSessionListener.
References Sirikata::OH::Manual::ServerQueryHandler::decrementServerQuery(), Sirikata::Logging::detailed, Sirikata::OH::Manual::ServerQueryHandler::incrementServerQuery(), mObjectState, mServerQueryHandler, Sirikata::OHDP::NodeID::null(), QPLOG, and unregisterObjectQuery().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::presenceConnected | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef | ||
) | [virtual] |
Invoked by the ObjectHost when an object's presence is connected to the space.
While it has received an acknowledgement, the connection may not fully be established (e.g. streams may not have finished connecting).
Reimplemented from Sirikata::OH::ObjectQueryProcessor.
void Sirikata::OH::Manual::ManualObjectQueryProcessor::presenceConnectedStream | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef, | ||
SSTStreamPtr | strm | ||
) | [virtual] |
Invoked by the ObjectHost when an object's presence is connected to the space and the underlying stream has been fully established.
Reimplemented from Sirikata::OH::ObjectQueryProcessor.
References mObjectState, and registerOrUpdateObjectQuery().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::presenceDisconnected | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef | ||
) | [virtual] |
Invoked by the ObjectHost when an object's presence has been disconnected from the space.
Reimplemented from Sirikata::OH::ObjectQueryProcessor.
void Sirikata::OH::Manual::ManualObjectQueryProcessor::queriersAreObserving | ( | const OHDP::SpaceNodeID & | snid, |
const ProxIndexID | indexid, | ||
const ObjectReference & | objid | ||
) |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::queriersStoppedObserving | ( | const OHDP::SpaceNodeID & | snid, |
const ProxIndexID | indexid, | ||
const ObjectReference & | objid | ||
) |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::registerOrUpdateObjectQuery | ( | const SpaceObjectReference & | sporef | ) | [private] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::removedReplicatedIndex | ( | const OHDP::SpaceNodeID & | snid, |
ProxIndexID | iid | ||
) |
References mObjectQueryHandlers.
Referenced by Sirikata::OH::Manual::ServerQueryHandler::onDestroyedReplicatedIndex().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::removedServerQuery | ( | const OHDP::SpaceNodeID & | snid | ) |
References mObjectQueryHandlers.
Referenced by Sirikata::OH::Manual::ServerQueryHandler::onSpaceNodeSessionEnded().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::replicatedNodeRemoved | ( | const OHDP::SpaceNodeID & | snid, |
ProxIndexID | indexid, | ||
const ObjectReference & | objid | ||
) |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::start | ( | ) | [virtual] |
Implements Sirikata::Service.
References mContext, mServerQueryHandler, Sirikata::ObjectHostContext::objectHost, and Sirikata::OH::Manual::ServerQueryHandler::start().
void Sirikata::OH::Manual::ManualObjectQueryProcessor::stop | ( | ) | [virtual] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::unregisterObjectQuery | ( | const SpaceObjectReference & | sporef | ) | [private] |
void Sirikata::OH::Manual::ManualObjectQueryProcessor::updateQuery | ( | HostedObjectPtr | ho, |
const SpaceObjectReference & | sporef, | ||
const String & | new_query | ||
) | [virtual] |
Request an update to the query parameters for the specified presence.
ho | the HostedObject requesting the update |
sporef | the ID of the presence to update a query for |
new_query | the encoded, updated query |
Implements Sirikata::OH::ObjectQueryProcessor.
References mObjectState, registerOrUpdateObjectQuery(), and unregisterObjectQuery().
Referenced by createdServerQuery(), start(), and stop().
Referenced by onObjectNodeSession(), queriersAreObserving(), queriersStoppedObserving(), replicatedNodeRemoved(), start(), and stop().
Referenced by createdServerQuery().