26 #ifndef _RECOVERYPOINT_H_
27 #define _RECOVERYPOINT_H_
29 #include <amps/BookmarkStore.hpp>
31 #include <amps/util.hpp>
86 return _body.get().getSubId();
93 return _body.get().getBookmark();
99 return _body.get().deepCopy();
105 return _body.get().deepCopy(original_._body.get());
111 return _body.get().clear();
120 RefHandle<RecoveryPointImpl> _body;
127 const Field& bookmark_);
146 FixedRecoveryPoint(
const Field& subId_,
const Field& bookmark_)
147 : _subId(subId_), _bookmark(bookmark_), _owner(false)
151 FixedRecoveryPoint(
const Field& subId_,
const Field& bookmark_,
163 _bookmark = bookmark_;
167 virtual ~FixedRecoveryPoint()
257 virtual ~DynamicRecoveryPoint()
290 if (
typeid(*
this) ==
typeid(original_))
313 mutable Field _bookmark;
Defines the AMPS::Field class, which represents the value of a field in a message.
Interface for BookmarkStoreImpl classes.
Definition: BookmarkStore.hpp:229
DynamicRecoveryPoint is a RecoveryPoint implementation where subId is set explicitly but bookmark is ...
Definition: RecoveryPoint.hpp:235
virtual RecoveryPointImpl * deepCopy()
Return a deep copy of self.
Definition: RecoveryPoint.hpp:276
virtual void clear()
Clear the internal state, possibly reclaiming memory.
Definition: RecoveryPoint.hpp:298
virtual RecoveryPointImpl * deepCopy(const RecoveryPointImpl &original_)
Make self a deep copy of original_.
Definition: RecoveryPoint.hpp:281
static RecoveryPoint create(const Field &subId_, const Field &, const BookmarkStore &store_)
Use this function in BookmarkStore::setRecoveryPointFactory( std::bind(&DynamicRecoveryPoint::create,...
Definition: RecoveryPoint.hpp:240
virtual const Field & getBookmark() const
Get the bookmark for this recovery point.
Definition: RecoveryPoint.hpp:270
virtual const Field & getSubId() const
Get the sub id for this recovery point.
Definition: RecoveryPoint.hpp:265
Field represents the value of a single field in a Message.
Definition: Field.hpp:87
void clear()
Deletes the data associated with this Field, should only be used on Fields that were created as deepC...
Definition: Field.hpp:247
void deepCopy(const Field &orig_)
Makes self a deep copy of the original field.
Definition: Field.hpp:218
FixedRecoveryPoint is a RecoveryPoint implementation where subId and bookmark are set explicitly.
Definition: RecoveryPoint.hpp:134
virtual const Field & getSubId() const
Get the sub id for this recovery point.
Definition: RecoveryPoint.hpp:176
virtual RecoveryPointImpl * deepCopy(const RecoveryPointImpl &original_)
Make self a deep copy of original_.
Definition: RecoveryPoint.hpp:191
virtual void clear()
Clear the internal state, possibly reclaiming memory.
Definition: RecoveryPoint.hpp:206
static RecoveryPoint create(const Field &subId_, const Field &bookmark_)
Use this function in BookmarkStore::setRecoveryPointFactory( std::bind(&FixedRecoveryPoint::create,...
Definition: RecoveryPoint.hpp:139
virtual const Field & getBookmark() const
Get the bookmark for this recovery point.
Definition: RecoveryPoint.hpp:181
virtual RecoveryPointImpl * deepCopy()
Return a deep copy of self.
Definition: RecoveryPoint.hpp:186
RecoveryPointImpl virtual base class provides access to the subId and bookmark needed to restart a su...
Definition: RecoveryPoint.hpp:50
virtual const Field & getSubId() const =0
Get the sub id for this recovery point.
virtual RecoveryPointImpl * deepCopy()=0
Return a deep copy of self.
virtual RecoveryPointImpl * deepCopy(const RecoveryPointImpl &original_)=0
Make self a deep copy of original_.
virtual void clear()=0
Clear the internal state, possibly reclaiming memory.
virtual const Field & getBookmark() const =0
Get the bookmark for this recovery point.
Provides access to the subId and bookmark needed to restart a subscription.
Definition: RecoveryPoint.hpp:68
RecoveryPoint deepCopy(const RecoveryPoint &original_)
Make self a deep copy of original_.
Definition: RecoveryPoint.hpp:103
const Field & getBookmark() const
Get the bookmark for this recovery point.
Definition: RecoveryPoint.hpp:91
void clear()
Clear the internal state, possibly reclaiming memory.
Definition: RecoveryPoint.hpp:109
const Field & getSubId() const
Get the sub id for this recovery point.
Definition: RecoveryPoint.hpp:84
RecoveryPoint deepCopy()
Return a deep copy of self.
Definition: RecoveryPoint.hpp:97
Message::Field getMostRecent(const Message::Field &subId_)
Returns the most recent bookmark from the log that ought to be used for (re-)subscriptions.
Definition: BookmarkStore.hpp:310