omegalib  13.1
omicron::AssetCacheService Class Reference

The asset cache service manages a set of caches. More...

#include <AssetCacheService.h>

Public Member Functions

 AssetCacheService ()
 
virtual ~AssetCacheService ()
 
virtual void initialize ()
 
virtual void dispose ()
 
virtual TcpConnectioncreateConnection (const ConnectionInfo &ci)
 Called when a new client connected. More...
 
void closeConnection (AssetCacheConnection *conn)
 
void setCacheRoot (const String &value)
 Sets the cache root. More...
 
String getCacheRoot ()
 
- Public Member Functions inherited from omicron::TcpServer
 TcpServer ()
 
 ~TcpServer ()
 
void setPort (int value)
 
int getPort ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void poll ()
 
TcpConnectiongetConnection (int id)
 
- Public Member Functions inherited from omicron::Service
 Service ()
 
int getServiceId ()
 
virtual ~Service ()
 
ServiceManagergetManager ()
 
String getName ()
 
bool isInitialized ()
 
bool isDebugEnabled ()
 Returns true if debug mode is enabled for this service. More...
 
ServicePollPriority getPollPriority ()
 
void setPollPriority (ServicePollPriority value)
 
virtual void setup (Setting &settings)
 
void lockEvents ()
 
void unlockEvents ()
 
EventwriteHead ()
 
EventreadHead ()
 
EventreadTail ()
 
EventgetEvent (int index)
 
void doSetup (ServiceManager *mng, Setting &settings)
 
void doInitialize (ServiceManager *sm, int serviceId)
 
- Public Member Functions inherited from omicron::ReferenceType
 ReferenceType ()
 
virtual ~ReferenceType ()
 
void ref ()
 
void unref ()
 
long refCount ()
 

Static Public Attributes

static const int DefaultPort = 22500
 

Additional Inherited Members

- Public Types inherited from omicron::Service
enum  ServiceType {
  Pointer = EventBase::ServiceTypePointer, Mocap = EventBase::ServiceTypeMocap, Keyboard = EventBase::ServiceTypeKeyboard, Controller = EventBase::ServiceTypeController,
  Ui = EventBase::ServiceTypeUi, Generic = EventBase::ServiceTypeGeneric, Brain = EventBase::ServiceTypeBrain, Wand = EventBase::ServiceTypeWand,
  Speech = EventBase::ServiceTypeSpeech
}
 This enumeration is kept for compatibility reason and may be removed in the future. More...
 
enum  ServicePollPriority { PollFirst, PollNormal, PollLast }
 
- Static Public Member Functions inherited from omicron::ReferenceType
static void printObjCounts ()
 
- Protected Member Functions inherited from omicron::TcpServer
virtual void accept ()
 
virtual void handleAccept (TcpConnection *newConnection, const asio::error_code &error)
 
- Static Protected Attributes inherited from omicron::ReferenceType
static List< ReferenceType * > mysObjList
 

Detailed Description

The asset cache service manages a set of caches.

A cache is a group of files that can be updated by a remote asset cache manager. The asset cache is used to synchronize files between machines: for instance, the head node on a cluster can use it to send sound assets to a sound server.

+ Inheritance diagram for omicron::AssetCacheService:

Constructor & Destructor Documentation

omicron::AssetCacheService::AssetCacheService ( )
virtual omicron::AssetCacheService::~AssetCacheService ( )
virtual

Member Function Documentation

void omicron::AssetCacheService::closeConnection ( AssetCacheConnection conn)
virtual TcpConnection* omicron::AssetCacheService::createConnection ( const ConnectionInfo ci)
virtual

Called when a new client connected.

Creates a TcpConnection instance to handle communication User code should reimplement this method.

Reimplemented from omicron::TcpServer.

virtual void omicron::AssetCacheService::dispose ( )
virtual

Reimplemented from omicron::Service.

String omicron::AssetCacheService::getCacheRoot ( )
inline
virtual void omicron::AssetCacheService::initialize ( )
virtual

Reimplemented from omicron::TcpServer.

void omicron::AssetCacheService::setCacheRoot ( const String value)
inline

Sets the cache root.

The cache root directory contains one subdirectory for each cache managed by the service.

Member Data Documentation

const int omicron::AssetCacheService::DefaultPort = 22500
static

The documentation for this class was generated from the following file: