Photon Server API Documentation v5.0RC1

Public Member Functions | Public Attributes | Properties | List of all members
Photon.Hive.Caching.RoomCacheBase.RoomInstance Class Reference

Used to track references for a room instance. More...

Public Member Functions

 RoomInstance (RoomCacheBase roomFactory, Room room)
 Initializes a new instance of the RoomInstance class. More...
 
RoomReference AddReference (PeerBase ownerPeer)
 Adds a reference to the room instance. More...
 
void ReleaseReference (RoomReference reference)
 Releases a reference from this instance. More...
 
override string ToString ()
 

Public Attributes

int ReferenceCount => this.references.Count
 Gets the number of references for the room instance. More...
 

Properties

Room Room [get]
 Gets the room. More...
 

Detailed Description

Used to track references for a room instance.

Constructor & Destructor Documentation

◆ RoomInstance()

Photon.Hive.Caching.RoomCacheBase.RoomInstance.RoomInstance ( RoomCacheBase  roomFactory,
Room  room 
)
inline

Initializes a new instance of the RoomInstance class.

Parameters
roomFactoryThe room factory.
roomThe room.

Member Function Documentation

◆ AddReference()

RoomReference Photon.Hive.Caching.RoomCacheBase.RoomInstance.AddReference ( PeerBase  ownerPeer)
inline

Adds a reference to the room instance.

Parameters
ownerPeerThe peer that holds this reference.
Returns
a new RoomReference

◆ ReleaseReference()

void Photon.Hive.Caching.RoomCacheBase.RoomInstance.ReleaseReference ( RoomReference  reference)
inline

Releases a reference from this instance.

Parameters
referenceThe room reference.

◆ ToString()

override string Photon.Hive.Caching.RoomCacheBase.RoomInstance.ToString ( )
inline

Member Data Documentation

◆ ReferenceCount

int Photon.Hive.Caching.RoomCacheBase.RoomInstance.ReferenceCount => this.references.Count

Gets the number of references for the room instance.

Property Documentation

◆ Room

Room Photon.Hive.Caching.RoomCacheBase.RoomInstance.Room
get

Gets the room.