Proud::CDbCacheServer2 Class Referenceabstract

Public Member Functions

virtual intptr_t GetCachingDataTreeCount ()=0
virtual void Start (CDbCacheServer2StartParameter &params)=0
virtual void Stop ()=0
virtual void SetDbmsWriteIntervalMs (int64_t val)=0
virtual void SetUnloadedDataHibernateDurationMs (int64_t val)=0
virtual void SetDefaultTimeoutTimeMs (int newValInMs)=0
virtual void SetDefaultTimeoutTimeSec (double newValInSec)=0
virtual AddrPort GetTcpListenerLocalAddr ()=0
virtual bool GetAllRemoteClientAddrPort (CFastArray< AddrPort > &ret)=0
virtual void SetUnloadRequestTimeoutTimeMs (int64_t timeoutMs)=0
virtual int64_t GetUnloadRequestTimeoutTimeMs () const =0

Static Public Member Functions

New ()

Detailed Description

Member Function Documentation

virtual bool Proud::CDbCacheServer2::GetAllRemoteClientAddrPort ( CFastArray< AddrPort > &  ret)
pure virtual

TODO:translate needed. Obtain the AddrPort for the DB Cache Client 2 connected to this DB Cache Server2.

  • The list obtained by this method is only the snapshot at the time of being called. Even after this function is returned, it does not guarantee that the content of the client list is the same as the status of the actual server.
    outputPlace where the list of AddrPort will be filled out.
virtual intptr_t Proud::CDbCacheServer2::GetCachingDataTreeCount ( )
pure virtual

Return the client is connected

virtual AddrPort Proud::CDbCacheServer2::GetTcpListenerLocalAddr ( )
pure virtual

Gets the address of TCP listening socket opened by this DB cache server

virtual int64_t Proud::CDbCacheServer2::GetUnloadRequestTimeoutTimeMs ( ) const
pure virtual

Return the timeout configuration value of the exclusive load request in millisecond unit.

static PROUDSRV_API CDbCacheServer2* Proud::CDbCacheServer2::New ( )

Creates DB cache server instance

virtual void Proud::CDbCacheServer2::SetDbmsWriteIntervalMs ( int64_t  val)
pure virtual

TODO:translate needed This is the time to stand by from after receiving the data add/modify/delete content from DB cache client 2 until recording it in DBMS.

  • If too short, the load on DBMS increases
  • If too long, when the DB cache server terminates abnormally (e.g.: power failure), it cannot record in DBMS and the data waiting in the memory is likely to be lost.
    valTime in millisecond unit
virtual void Proud::CDbCacheServer2::SetDefaultTimeoutTimeMs ( int  newValInMs)
pure virtual

Performs similar role as Proud.CNetServer.SetDefaultTimeoutTimeMs

virtual void Proud::CDbCacheServer2::SetDefaultTimeoutTimeSec ( double  newValInSec)
pure virtual

TODO:translate needed. Performs similar role as Proud.CNetServer.SetDefaultTimeoutTimeSec

virtual void Proud::CDbCacheServer2::SetUnloadedDataHibernateDurationMs ( int64_t  val)
pure virtual

TODO:translate needed Waiting time that the unloaded data at DB cache client waits until it is fully removed from DB cache memory

  • If this is set too short then the work load to DBMS will increase.
  • If this is set too long then it will increase the amount of memory usage in DB cache server.
virtual void Proud::CDbCacheServer2::SetUnloadRequestTimeoutTimeMs ( int64_t  timeoutMs)
pure virtual

Configure the time limit to wait for the processing of exclusive load request.

  • If the load and exclusivity acquisition is not completed within the time set with this value, the request is processed as a failure as a timeout.
  • The default value is 10 seconds (10000 milliseconds)
    timeoutMsThe time limit to be designated (millisecond unit)
virtual void Proud::CDbCacheServer2::Start ( CDbCacheServer2StartParameter params)
pure virtual

TODO:translate needed Enable the connection from the client and start the actual connection with DBMS.

paramsThe configuration value required to start CDbCacheServer2 (refer to CDbCacheServer2StartParameter)
virtual void Proud::CDbCacheServer2::Stop ( )
pure virtual

Disconnect with all clients, finish all works that in process then close thread.