IWorkerPeer Interface Reference

Inherited by JniTransport.

List of all members.


Detailed Description

Provides an interface to call back the container host.

This interface is given to a worker upon initialization. The interface allows the user code to send command objects back to the hosting container. The interface also provides access to the in-memory local cache and a particular Serializer by name.

See also:
ICppWorker

Public Member Functions

virtual CachePtr getCache (int percentToFree, int maxSize)=0
 Returns a global instance of the local cache that is process wide and shared by all dynamically loaded workers within the process.
virtual SerializergetSerializer (const std::string &className)=0
 Returns the global cached instance of a developers Serializer for a given named class.
virtual CommandObjectPtr SendCommand (void *Context, CommandObjectPtr Command)=0
 Sends a command to the container to be processed.
virtual void ThreadDetach ()=0
 Cleans thread related objects in the JVM.

Member Function Documentation

virtual CachePtr IWorkerPeer::getCache ( int  percentToFree,
int  maxSize 
) [pure virtual]

Returns a global instance of the local cache that is process wide and shared by all dynamically loaded workers within the process.

Parameters:
percentToFree - target percentage to free up apon a garbage collection cycle.
maxSize - maximum number of Entries this localCache can hold.

virtual Serializer* IWorkerPeer::getSerializer ( const std::string &  className  )  [pure virtual]

Returns the global cached instance of a developers Serializer for a given named class.

Parameters:
className 
Returns:
The globally cached Serializer for a given class.

virtual CommandObjectPtr IWorkerPeer::SendCommand ( void *  Context,
CommandObjectPtr  Command 
) [pure virtual]

Sends a command to the container to be processed.

This is the internal mechanism for communicating back to the host process, but may be utilized by the developer to execute custom Java logic within the same process space as the host container.

Parameters:
Context - User defined information that will be returned in the result block.
Command - The CommandObject to be processed.
Returns:
CommandObject reply that holds the status requested and will be filled by the command processor on this host adaptor.

virtual void IWorkerPeer::ThreadDetach (  )  [pure virtual]

Cleans thread related objects in the JVM.


Generated on Wed Sep 16 16:59:14 2009 for GigaSpaces XAP 7.0.1 C++ by  doxygen 1.5.3