1//
2// KillCursorsRequest.h
3//
4// Library: MongoDB
5// Package: MongoDB
6// Module: KillCursorsRequest
7//
8// Definition of the KillCursorsRequest class.
9//
10// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef MongoDB_KillCursorsRequest_INCLUDED
18#define MongoDB_KillCursorsRequest_INCLUDED
19
20
21#include "Poco/MongoDB/MongoDB.h"
22#include "Poco/MongoDB/RequestMessage.h"
23
24
25namespace Poco {
26namespace MongoDB {
27
28
29class MongoDB_API KillCursorsRequest: public RequestMessage
30 /// Class for creating an OP_KILL_CURSORS client request. This
31 /// request is used to kill cursors, which are still open,
32 /// returned by query requests.
33{
34public:
35 KillCursorsRequest();
36 /// Creates a KillCursorsRequest.
37
38 virtual ~KillCursorsRequest();
39 /// Destroys the KillCursorsRequest.
40
41 std::vector<Int64>& cursors();
42 /// The internal list of cursors.
43
44protected:
45 void buildRequest(BinaryWriter& writer);
46 std::vector<Int64> _cursors;
47};
48
49
50//
51// inlines
52//
53inline std::vector<Int64>& KillCursorsRequest::cursors()
54{
55 return _cursors;
56}
57
58
59} } // namespace Poco::MongoDB
60
61
62#endif // MongoDB_KillCursorsRequest_INCLUDED
63