CacheMethod that doesn't cache anything class. More...
#include <cachenonemethod.h>
Public Member Functions | |
| CacheNoneMethod () | |
| Default Constructor. | |
| CacheNoneMethod (const CacheNoneMethod &rhs) | |
| Copy Constructor. No fields to copy or zero. | |
| virtual | ~CacheNoneMethod () |
| Destructor, virtual. | |
| virtual void | update () |
| Updates the Cache. Actually does nothing, as there is no cache to flush or revalidate. | |
| virtual void | getById (uint32_t id) |
| Gets the thing by its Id directly from the server. | |
| virtual void | markInvalid (uint32_t id) |
| Marks thing as invalid using its ID. Doesn't do anything, as there is no cached objects to invalid. | |
| virtual CacheMethod * | clone () |
| Clones this CacheNoneMethod. | |
Protected Member Functions | |
| void | getIdList () |
| Requests the IdList from the server directly. | |
| void | receiveItem (Frame *frame) |
| Called when an item is returned from the server. Passes the frame do this method's Cache::newItem() if it is not a fail frame. Deletes the frame if it is a fail frame. | |
| void | receiveIdList (Frame *frame) |
| Called when an IdList is received from the server. Takes just the Ids and sends them to CacheMethod::newIdList(). | |
CacheMethod that doesn't cache anything class.
| CacheMethod * TPProto::CacheNoneMethod::clone | ( | ) | [virtual] |
Clones this CacheNoneMethod.
Implements TPProto::CacheMethod.
References CacheNoneMethod().
| void TPProto::CacheNoneMethod::getById | ( | uint32_t | id | ) | [virtual] |
Gets the thing by its Id directly from the server.
| id | The Id of the thing that is requested. |
Implements TPProto::CacheMethod.
References TPProto::GetById::addId(), TPProto::CacheMethod::cache, TPProto::Cache::createGetByIdFrame(), TPProto::ProtocolLayer::getFrameCodec(), TPProto::CacheMethod::protocol, receiveItem(), and TPProto::FrameCodec::sendFrame().
| void TPProto::CacheNoneMethod::receiveIdList | ( | Frame * | frame | ) | [protected] |
Called when an IdList is received from the server. Takes just the Ids and sends them to CacheMethod::newIdList().
| frame | The Frame that has the IdList. |
References TPProto::Frame::getType(), and TPProto::CacheMethod::newIdList().
Referenced by getIdList().
| void TPProto::CacheNoneMethod::receiveItem | ( | Frame * | frame | ) | [protected] |
Called when an item is returned from the server. Passes the frame do this method's Cache::newItem() if it is not a fail frame. Deletes the frame if it is a fail frame.
| frame | The Frame of this item. |
References TPProto::CacheMethod::cache, TPProto::Frame::getType(), and TPProto::Cache::newItem().
Referenced by getById().
1.6.1