Photon Server API
Public Member Functions | Protected Member Functions | List of all members
Photon.MmoDemo.Server.ItemCache Class Reference

A cache for items. Each World has one item cache. More...

Inheritance diagram for Photon.MmoDemo.Server.ItemCache:

Public Member Functions

 ItemCache ()
 
bool AddItem (Item item)
 
bool RemoveItem (string itemId)
 
bool TryGetItem (string itemId, out Item item)
 
void Dispose ()
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Detailed Description

A cache for items. Each World has one item cache.

It uses an ReaderWriterLockSlim to ensure thread safety. All members are thread safe.

Constructor & Destructor Documentation

Photon.MmoDemo.Server.ItemCache.ItemCache ( )
inline

Member Function Documentation

bool Photon.MmoDemo.Server.ItemCache.AddItem ( Item  item)
inline
void Photon.MmoDemo.Server.ItemCache.Dispose ( )
inline
virtual void Photon.MmoDemo.Server.ItemCache.Dispose ( bool  disposing)
inlineprotectedvirtual
bool Photon.MmoDemo.Server.ItemCache.RemoveItem ( string  itemId)
inline
bool Photon.MmoDemo.Server.ItemCache.TryGetItem ( string  itemId,
out Item  item 
)
inline