You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/06/23 12:51:17 UTC
[1/2] ignite git commit: Revert "IGNITE-3113: CPP: Binary containers
documentation."
Repository: ignite
Updated Branches:
refs/heads/ignite-1.6 c0adcc231 -> f70c81ba9
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transaction.h b/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
index b51a42c..f68470e 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transaction.h
@@ -24,6 +24,7 @@
#define _IGNITE_TRANSACTIONS_TRANSACTION
#include <ignite/common/concurrent.h>
+#include <ignite/jni/java.h>
#include "ignite/impl/transactions/transaction_impl.h"
#include "ignite/transactions/transaction_consts.h"
@@ -33,26 +34,13 @@ namespace ignite
namespace transactions
{
/**
- * %Ignite cache transaction.
- * Cache transactions have a default 2PC (two-phase-commit) behavior.
- *
- * @see TransactionConcurrency and TransactionIsolation for details on
- * the supported isolation levels and concurrency models.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
+ * Transaction.
*/
class IGNITE_FRIEND_EXPORT Transaction
{
public:
/**
* Constructor.
- *
- * Internal method. Should not be used by user.
- *
- * @param impl Implementation.
*/
Transaction(common::concurrent::SharedPointer<impl::transactions::TransactionImpl> impl);
@@ -78,60 +66,36 @@ namespace ignite
/**
* Commit the transaction.
- *
- * This method should only be used on the valid instance.
- *
- * @throw IgniteError class instance in case of failure.
*/
void Commit();
/**
* Commit the transaction.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void Commit(IgniteError& err);
/**
* Rollback the transaction.
- *
- * This method should only be used on the valid instance.
- *
- * @throw IgniteError class instance in case of failure.
*/
void Rollback();
/**
* Rollback the transaction.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void Rollback(IgniteError& err);
/**
* Close the transaction.
- *
- * This method should only be used on the valid instance.
- *
- * @throw IgniteError class instance in case of failure.
*/
void Close();
/**
* Close the transaction.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void Close(IgniteError& err);
@@ -142,10 +106,6 @@ namespace ignite
* After transaction have been marked as rollback-only it may
* only be rolled back. Error occurs if such transaction is
* being commited.
- *
- * This method should only be used on the valid instance.
- *
- * @throw IgniteError class instance in case of failure.
*/
void SetRollbackOnly();
@@ -156,10 +116,6 @@ namespace ignite
* only be rolled back. Error occurs if such transaction is
* being commited.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void SetRollbackOnly(IgniteError& err);
@@ -172,8 +128,6 @@ namespace ignite
* being commited.
*
* @return True if the transaction is rollback-only.
- *
- * @throw IgniteError class instance in case of failure.
*/
bool IsRollbackOnly();
@@ -184,10 +138,6 @@ namespace ignite
* only be rolled back. Error occurs if such transaction is
* being commited.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
* @return True if the transaction is rollback-only.
*/
@@ -196,21 +146,13 @@ namespace ignite
/**
* Get current state.
*
- * This method should only be used on the valid instance.
- *
* @return Transaction state.
- *
- * @throw IgniteError class instance in case of failure.
*/
TransactionState GetState();
/**
* Get current state.
*
- * Properly sets error param in case of failure.
- *
- * This method should only be used on the valid instance.
- *
* @param err Error.
* @return Transaction state.
*/
@@ -219,8 +161,6 @@ namespace ignite
/**
* Get concurrency.
*
- * This method should only be used on the valid instance.
- *
* @return Concurrency.
*/
TransactionConcurrency GetConcurrency() const
@@ -231,8 +171,6 @@ namespace ignite
/**
* Get isolation.
*
- * This method should only be used on the valid instance.
- *
* @return Isolation.
*/
TransactionIsolation GetIsolation() const
@@ -243,8 +181,6 @@ namespace ignite
/**
* Get timeout.
*
- * This method should only be used on the valid instance.
- *
* @return Timeout in milliseconds. Zero if timeout is infinite.
*/
int64_t GetTimeout() const
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h b/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
index 8b25d3a..5799b9f 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transaction_consts.h
@@ -17,7 +17,7 @@
/**
* @file
- * Declares Transaction-related enumerations.
+ * Declares ignite::transactions::TransactionState enumeration.
*/
#ifndef _IGNITE_TRANSACTIONS_TRANSACTION_CONSTS
@@ -28,37 +28,14 @@ namespace ignite
namespace transactions
{
/**
- * Transaction concurrency control model.
+ * Transaction concurrency control.
*/
enum TransactionConcurrency
{
- /**
- * Optimistic concurrency model. In this mode all cache operations
- * are not distributed to other nodes until Transaction::Commit()
- * is called. In this mode one @c 'PREPARE' message will be sent to
- * participating cache nodes to start acquiring per-transaction
- * locks, and once all nodes reply @c 'OK', a one-way @c 'COMMIT'
- * message is sent without waiting for reply.
- *
- * Note that in this mode, optimistic failures are only possible in
- * conjunction with ::IGNITE_TX_ISOLATION_SERIALIZABLE isolation
- * level. In all other cases, optimistic transactions will never
- * fail optimistically and will always be identically ordered on all
- * participating grid nodes.
- */
+ /** Optimistic concurrency control. */
IGNITE_TX_CONCURRENCY_OPTIMISTIC = 0,
- /**
- * Pessimistic concurrency model. In this mode a lock is acquired
- * on all cache operations with exception of read operations in
- * ::IGNITE_TX_ISOLATION_READ_COMMITTED mode. All optional filters
- * passed into cache operations will be evaluated after successful
- * lock acquisition. Whenever Transaction::Commit() is called, a
- * single one-way @c 'COMMIT' message is sent to participating cache
- * nodes without waiting for reply. Note that there is no reason for
- * distributed @c 'PREPARE' step, as all locks have been already
- * acquired.
- */
+ /** Pessimistic concurrency control. */
IGNITE_TX_CONCURRENCY_PESSIMISTIC = 1
};
@@ -67,42 +44,13 @@ namespace ignite
*/
enum TransactionIsolation
{
- /**
- * Read committed isolation level. This isolation level means that
- * always a committed value will be provided for read operations.
- * With this isolation level values are always read from cache
- * global memory or persistent store every time a value is accessed.
- * In other words, if the same key is accessed more than once within
- * the same transaction, it may have different value every time
- * since global cache memory may be updated concurrently by other
- * threads.
- */
+ /** Read committed isolation level. */
IGNITE_TX_ISOLATION_READ_COMMITTED = 0,
- /**
- * Repeatable read isolation level. This isolation level means that
- * if a value was read once within transaction, then all consecutive
- * reads will provide the same in-transaction value. With this
- * isolation level accessed values are stored within in-transaction
- * memory, so consecutive access to the same key within the same
- * transaction will always return the value that was previously read
- * or updated within this transaction. If concurrency is
- * ::IGNITE_TX_CONCURRENCY_PESSIMISTIC, then a lock on the key will
- * be acquired prior to accessing the value.
- */
+ /** Repeatable read isolation level. */
IGNITE_TX_ISOLATION_REPEATABLE_READ = 1,
- /**
- * Serializable isolation level. This isolation level means that all
- * transactions occur in a completely isolated fashion, as if all
- * transactions in the system had executed serially, one after the
- * other. Read access with this level happens the same way as with
- * ::IGNITE_TX_ISOLATION_REPEATABLE_READ level. However, in
- * ::IGNITE_TX_CONCURRENCY_OPTIMISTIC mode, if some transactions
- * cannot be serially isolated from each other, then one winner will
- * be picked and the other transactions in conflict will result in
- * IgniteError being thrown.
- */
+ /** Serializable isolation level. */
IGNITE_TX_ISOLATION_SERIALIZABLE = 2
};
@@ -111,31 +59,31 @@ namespace ignite
*/
enum TransactionState
{
- /** %Transaction started. */
+ /** Transaction started. */
IGNITE_TX_STATE_ACTIVE,
- /** %Transaction validating. */
+ /** Transaction validating. */
IGNITE_TX_STATE_PREPARING,
- /** %Transaction validation succeeded. */
+ /** Transaction validation succeeded. */
IGNITE_TX_STATE_PREPARED,
- /** %Transaction is marked for rollback. */
+ /** Transaction is marked for rollback. */
IGNITE_TX_STATE_MARKED_ROLLBACK,
- /** %Transaction commit started (validating finished). */
+ /** Transaction commit started (validating finished). */
IGNITE_TX_STATE_COMMITTING,
- /** %Transaction commit succeeded. */
+ /** Transaction commit succeeded. */
IGNITE_TX_STATE_COMMITTED,
- /** %Transaction rollback started (validation failed). */
+ /** Transaction rollback started (validation failed). */
IGNITE_TX_STATE_ROLLING_BACK,
- /** %Transaction rollback succeeded. */
+ /** Transaction rollback succeeded. */
IGNITE_TX_STATE_ROLLED_BACK,
- /** %Transaction rollback failed or is otherwise unknown state. */
+ /** Transaction rollback failed or is otherwise unknown state. */
IGNITE_TX_STATE_UNKNOWN
};
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/transactions/transaction_metrics.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transaction_metrics.h b/modules/platforms/cpp/core/include/ignite/transactions/transaction_metrics.h
index 00ebd10..4986a64 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transaction_metrics.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transaction_metrics.h
@@ -32,15 +32,13 @@ namespace ignite
namespace transactions
{
/**
- * %Transaction metrics, shared across all caches.
+ * Transaction metrics.
*/
class IGNITE_IMPORT_EXPORT TransactionMetrics
{
public:
/**
* Default constructor.
- *
- * Constructed instance is not valid.
*/
TransactionMetrics() :
valid(false),
@@ -73,8 +71,6 @@ namespace ignite
/**
* Copy constructor.
- *
- * @param other Another instance.
*/
TransactionMetrics(const TransactionMetrics& other) :
valid(other.valid),
@@ -88,9 +84,6 @@ namespace ignite
/**
* Assignment operator.
- *
- * @param other Another instance.
- * @return @c *this.
*/
TransactionMetrics& operator=(const TransactionMetrics& other)
{
@@ -112,7 +105,7 @@ namespace ignite
{
return commitTime;
}
-
+
/**
* Get rollback time.
*
@@ -152,7 +145,7 @@ namespace ignite
* in case of error. Invalid instances also often can be
* created using default constructor.
*
- * @return @c true if the instance contains valid data.
+ * @return True if the instance contains valid data.
*/
bool IsValid() const
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/transactions/transactions.h b/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
index 98282bd..130116a 100644
--- a/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
+++ b/modules/platforms/cpp/core/include/ignite/transactions/transactions.h
@@ -35,22 +35,13 @@ namespace ignite
namespace transactions
{
/**
- * %Transactions facade.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
+ * Transactions.
*/
class IGNITE_FRIEND_EXPORT Transactions
{
public:
/**
* Constructor.
- *
- * Internal method. Should not be used by user.
- *
- * @param impl Implementation.
*/
Transactions(ignite::common::concurrent::SharedPointer<impl::transactions::TransactionsImpl> impl);
@@ -84,16 +75,14 @@ namespace ignite
Transaction GetTx();
/**
- * Start new transaction with default isolation, concurrency
- * and timeout.
+ * Start new transaction.
*
* @return New transaction instance.
*/
Transaction TxStart();
/**
- * Start new transaction with default isolation, concurrency
- * and timeout.
+ * Start new transaction.
*
* @param err Error.
* @return New transaction instance.
@@ -101,8 +90,7 @@ namespace ignite
Transaction TxStart(IgniteError& err);
/**
- * Starts new transaction with the specified concurrency and
- * isolation.
+ * Start new transaction.
*
* @param concurrency Concurrency.
* @param isolation Isolation.
@@ -112,8 +100,7 @@ namespace ignite
TransactionIsolation isolation);
/**
- * Starts new transaction with the specified concurrency and
- * isolation.
+ * Start new transaction.
*
* @param concurrency Concurrency.
* @param isolation Isolation.
@@ -124,14 +111,12 @@ namespace ignite
TransactionIsolation isolation, IgniteError& err);
/**
- * Starts transaction with specified isolation, concurrency,
- * timeout, and number of participating entries.
+ * Start new transaction.
*
* @param concurrency Concurrency.
* @param isolation Isolation.
* @param timeout Timeout. Zero if for infinite timeout.
- * @param txSize Number of entries participating in transaction
- * (may be approximate).
+ * @param txSize Number of entries participating in transaction (may be approximate).
* @return New transaction instance.
*/
Transaction TxStart(TransactionConcurrency concurrency,
@@ -144,8 +129,7 @@ namespace ignite
* @param concurrency Concurrency.
* @param isolation Isolation.
* @param timeout Timeout. Zero if for infinite timeout.
- * @param txSize Number of entries participating in transaction
- * (may be approximate).
+ * @param txSize Number of entries participating in transaction (may be approximate).
* @param err Error.
* @return New transaction instance.
*/
@@ -154,14 +138,14 @@ namespace ignite
int32_t txSize, IgniteError& err);
/**
- * Get transaction metrics.
+ * Get metrics.
*
* @return Metrics instance.
*/
TransactionMetrics GetMetrics();
/**
- * Get transaction metrics.
+ * Get metrics.
*
* @param err Error.
* @return Metrics instance.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/namespaces.dox
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/namespaces.dox b/modules/platforms/cpp/core/namespaces.dox
index 0f5f11f..20aa5ba 100644
--- a/modules/platforms/cpp/core/namespaces.dox
+++ b/modules/platforms/cpp/core/namespaces.dox
@@ -37,7 +37,7 @@
}
/**
- * %Ignite %Transaction API.
+ * %Ignite Transaction API.
*/
namespace transactions
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/cpp.dxg
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/cpp.dxg b/modules/platforms/cpp/cpp.dxg
index d25d978..605a613 100644
--- a/modules/platforms/cpp/cpp.dxg
+++ b/modules/platforms/cpp/cpp.dxg
@@ -1715,8 +1715,8 @@ GENERATE_LEGEND = YES
DOT_CLEANUP = YES
-;INPUT=core binary common
-;EXCLUDE=core/include/ignite/impl core/os/linux/include/ignite/impl core/os/linux/src/impl core/os/win/include/ignite/impl core/os/win/src/impl core/src/impl binary/include/ignite/impl binary/src/impl common/include/ignite/common common/os
+;INPUT=core binary
+;EXCLUDE=core/include/ignite/impl core/os/linux/include/ignite/impl core/os/linux/src/impl core/os/win/include/ignite/impl core/os/win/src/impl core/src/impl binary/include/ignite/impl binary/src/impl
;STRIP_FROM_PATH=core/include/ignite core/src binary/include/ignite binary/src
;OUTPUT_DIRECTORY=../../clients/target/cppdoc
;PROJECT_LOGO=../../../assembly/docfiles/ignite_logo.png
[2/2] ignite git commit: Revert "IGNITE-3113: CPP: Binary containers
documentation."
Posted by vo...@apache.org.
Revert "IGNITE-3113: CPP: Binary containers documentation."
This reverts commit c0adcc231af7fbf58842a951f66e9164fac44373.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f70c81ba
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f70c81ba
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f70c81ba
Branch: refs/heads/ignite-1.6
Commit: f70c81ba9b6346e737556b76042e3d0abdc32df7
Parents: c0adcc2
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Jun 23 15:51:02 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jun 23 15:51:02 2016 +0300
----------------------------------------------------------------------
.../include/ignite/binary/binary_containers.h | 191 ++++---------------
.../include/ignite/binary/binary_raw_reader.h | 25 +--
.../include/ignite/binary/binary_raw_writer.h | 13 --
.../include/ignite/binary/binary_reader.h | 13 --
.../include/ignite/binary/binary_writer.h | 13 --
.../platforms/cpp/common/include/ignite/date.h | 2 +-
.../cpp/common/include/ignite/ignite_error.h | 19 +-
.../cpp/common/include/ignite/timestamp.h | 2 +-
.../platforms/cpp/common/src/ignite_error.cpp | 12 +-
.../cpp/core/include/ignite/cache/cache.h | 186 ++----------------
.../cpp/core/include/ignite/cache/cache_entry.h | 14 +-
.../include/ignite/cache/query/query_argument.h | 33 ++--
.../include/ignite/cache/query/query_cursor.h | 17 +-
.../ignite/cache/query/query_fields_cursor.h | 11 +-
.../ignite/cache/query/query_fields_row.h | 22 +--
.../include/ignite/cache/query/query_scan.h | 10 +-
.../core/include/ignite/cache/query/query_sql.h | 15 +-
.../ignite/cache/query/query_sql_fields.h | 15 +-
.../platforms/cpp/core/include/ignite/ignite.h | 21 +-
.../core/include/ignite/ignite_configuration.h | 4 +-
.../cpp/core/include/ignite/ignition.h | 2 +-
.../include/ignite/transactions/transaction.h | 68 +------
.../ignite/transactions/transaction_consts.h | 84 ++------
.../ignite/transactions/transaction_metrics.h | 13 +-
.../include/ignite/transactions/transactions.h | 36 +---
modules/platforms/cpp/core/namespaces.dox | 2 +-
modules/platforms/cpp/cpp.dxg | 4 +-
27 files changed, 160 insertions(+), 687 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
index 8f26416..946101c 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_containers.h
@@ -37,51 +37,37 @@ namespace ignite
{
/**
* Binary string array writer.
- *
- * Can be used to write array of strings one by one.
- *
- * Use Write() method to write array string by string, then finilize
- * the writing by calling Close() method. Once the Close() method have
- * been called, instance is not usable and will throw an IgniteError
- * on any subsequent attempt to use it.
*/
class IGNITE_IMPORT_EXPORT BinaryStringArrayWriter
{
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
- *
- * @param impl Writer implementation.
+ *
* @param id Identifier.
+ * @param impl Writer.
*/
BinaryStringArrayWriter(impl::binary::BinaryWriterImpl* impl, int32_t id);
/**
- * Write null-terminated string.
- *
- * @param val Null-terminated character sequence to write.
+ * Write string.
*
- * @throw IgniteError if the writer instance is closed already.
+ * @param val Null-terminated character sequence.
*/
void Write(const char* val);
/**
* Write string.
*
- * @param val String to write.
- * @param len String length in bytes.
- *
- * @throw IgniteError if the writer instance is closed already.
+ * @param val String.
+ * @param len String length (characters).
*/
void Write(const char* val, int32_t len);
/**
* Write string.
*
- * @param val String to write.
- *
- * @throw IgniteError if the writer instance is closed already.
+ * @param val String.
*/
void Write(const std::string& val)
{
@@ -90,32 +76,18 @@ namespace ignite
/**
* Close the writer.
- *
- * This method should be called to finilize writing
- * of the array.
- *
- * @throw IgniteError if the writer instance is closed already.
*/
void Close();
-
private:
/** Implementation delegate. */
impl::binary::BinaryWriterImpl* impl;
- /** Identifier. */
+ /** Idnetifier. */
const int32_t id;
};
/**
- * Binary array writer.
- *
- * Can be used to write array of values of the specific type one by
- * one.
- *
- * Use Write() method to write array value by value, then finilize
- * the writing by calling Close() method. Once the Close() method have
- * been called, instance is not usable and will throw an IgniteError
- * on any subsequent attempt to use it.
+ * Binary collection writer.
*/
template<typename T>
class IGNITE_IMPORT_EXPORT BinaryArrayWriter
@@ -123,13 +95,11 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Writer implementation.
+ * @param impl Writer.
* @param id Identifier.
*/
- BinaryArrayWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) :
- impl(impl), id(id)
+ BinaryArrayWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) : impl(impl), id(id)
{
// No-op.
}
@@ -137,9 +107,7 @@ namespace ignite
/**
* Write a value.
*
- * @param val Value to write.
- *
- * @throw IgniteError if the writer instance is closed already.
+ * @param val Value.
*/
void Write(const T& val)
{
@@ -148,17 +116,11 @@ namespace ignite
/**
* Close the writer.
- *
- * This method should be called to finilize writing
- * of the array.
- *
- * @throw IgniteError if the writer instance is closed already.
*/
void Close()
{
impl->CommitContainer(id);
}
-
private:
/** Implementation delegate. */
impl::binary::BinaryWriterImpl* impl;
@@ -169,14 +131,6 @@ namespace ignite
/**
* Binary collection writer.
- *
- * Can be used to write collection of values of the specific type one by
- * one.
- *
- * Use Write() method to write collection value by value, then finilize
- * the writing by calling Close() method. Once the Close() method have
- * been called, instance is not usable and will throw an IgniteError
- * on any subsequent attempt to use it.
*/
template<typename T>
class IGNITE_IMPORT_EXPORT BinaryCollectionWriter
@@ -184,13 +138,11 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Writer implementation.
+ * @param impl Writer.
* @param id Identifier.
*/
- BinaryCollectionWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) :
- impl(impl), id(id)
+ BinaryCollectionWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) : impl(impl), id(id)
{
// No-op.
}
@@ -198,9 +150,7 @@ namespace ignite
/**
* Write a value.
*
- * @param val Value to write.
- *
- * @throw IgniteError if the writer instance is closed already.
+ * @param val Value.
*/
void Write(const T& val)
{
@@ -209,11 +159,6 @@ namespace ignite
/**
* Close the writer.
- *
- * This method should be called to finilize writing
- * of the collection.
- *
- * @throw IgniteError if the writer instance is closed already.
*/
void Close()
{
@@ -229,13 +174,6 @@ namespace ignite
/**
* Binary map writer.
- *
- * Can be used to write map element by element.
- *
- * Use Write() method to write map value by value, then finilize
- * the writing by calling Close() method. Once the Close() method have
- * been called, instance is not usable and will throw an IgniteError
- * on any subsequent attempt to use it.
*/
template<typename K, typename V>
class IGNITE_IMPORT_EXPORT BinaryMapWriter
@@ -243,24 +181,19 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Writer implementation.
- * @param id Identifier.
+ * @param impl Writer.
*/
- BinaryMapWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) :
- impl(impl), id(id)
+ BinaryMapWriter(impl::binary::BinaryWriterImpl* impl, int32_t id) : impl(impl), id(id)
{
// No-op.
}
/**
- * Write a map entry.
- *
- * @param key Key element of the map entry.
- * @param val Value element of the map entry.
+ * Write a value.
*
- * @throw IgniteError if the writer instance is closed already.
+ * @param key Key.
+ * @param val Value.
*/
void Write(const K& key, const V& val)
{
@@ -269,10 +202,6 @@ namespace ignite
/**
* Close the writer.
- *
- * This method should be called to finilize writing of the map.
- *
- * @throw IgniteError if the writer instance is closed already.
*/
void Close()
{
@@ -288,20 +217,14 @@ namespace ignite
/**
* Binary string array reader.
- *
- * Can be used to read array of strings string by string.
- *
- * Use GetNext() method to read array value by value while HasNext()
- * method returns true.
*/
class IGNITE_IMPORT_EXPORT BinaryStringArrayReader
{
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Reader implementation.
+ * @param impl Reader.
* @param id Identifier.
* @param size Array size.
*/
@@ -317,24 +240,20 @@ namespace ignite
/**
* Get next element.
*
- * @param res Buffer to store data to.
+ * @param res Array to store data to.
* @param len Expected length of string. NULL terminator will be set in case len is
* greater than real string length.
* @return Actual amount of elements read. If "len" argument is less than actual
* array size or resulting array is set to null, nothing will be written
* to resulting array and returned value will contain required array length.
* -1 will be returned in case array in stream was null.
- *
- * @throw IgniteError if there is no element to read.
*/
int32_t GetNext(char* res, int32_t len);
/**
* Get next element.
*
- * @return String.
- *
- * @throw IgniteError if there is no element to read.
+ * @return String.
*/
std::string GetNext()
{
@@ -360,30 +279,22 @@ namespace ignite
int32_t GetSize() const;
/**
- * Check whether array is NULL.
- *
- * @return True if the array is NULL.
+ * Whether array is NULL.
*/
bool IsNull() const;
-
private:
/** Implementation delegate. */
impl::binary::BinaryReaderImpl* impl;
/** Identifier. */
- const int32_t id;
+ const int32_t id;
/** Size. */
- const int32_t size;
+ const int32_t size;
};
/**
* Binary array reader.
- *
- * Can be used to read array of values of the specific type one by one.
- *
- * Use GetNext() method to read array value by value while HasNext()
- * method returns true.
*/
template<typename T>
class BinaryArrayReader
@@ -391,9 +302,8 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Reader implementation.
+ * @param impl Reader.
* @param id Identifier.
* @param size Array size.
*/
@@ -417,8 +327,6 @@ namespace ignite
* Read next element.
*
* @return Next element.
- *
- * @throw IgniteError if there is no element to read.
*/
T GetNext()
{
@@ -436,9 +344,7 @@ namespace ignite
}
/**
- * Check whether array is NULL.
- *
- * @return True if the array is NULL.
+ * Whether array is NULL.
*/
bool IsNull()
{
@@ -457,12 +363,6 @@ namespace ignite
/**
* Binary collection reader.
- *
- * Can be used to read collection of values of the specific type
- * one by one.
- *
- * Use GetNext() method to read array value by value while HasNext()
- * method returns true.
*/
template<typename T>
class BinaryCollectionReader
@@ -470,9 +370,8 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Reader implementation.
+ * @param impl Reader.
* @param id Identifier.
* @param type Collection type.
* @param size Collection size.
@@ -497,8 +396,6 @@ namespace ignite
* Read next element.
*
* @return Next element.
- *
- * @throw IgniteError if there is no element to read.
*/
T GetNext()
{
@@ -508,8 +405,7 @@ namespace ignite
/**
* Get collection type.
*
- * @return Collection type. See CollectionType for the list of
- * available values and their description.
+ * @return Type.
*/
CollectionType GetType()
{
@@ -527,9 +423,7 @@ namespace ignite
}
/**
- * Check whether collection is NULL.
- *
- * @return True if the collection is NULL.
+ * Whether collection is NULL.
*/
bool IsNull()
{
@@ -551,11 +445,6 @@ namespace ignite
/**
* Binary map reader.
- *
- * Can be used to read map entry by entry.
- *
- * Use GetNext() method to read array value by value while HasNext()
- * method returns true.
*/
template<typename K, typename V>
class BinaryMapReader
@@ -563,9 +452,8 @@ namespace ignite
public:
/**
* Constructor.
- * Internal call. Should not be used by user.
*
- * @param impl Reader implementation.
+ * @param impl Reader.
* @param id Identifier.
* @param type Map type.
* @param size Map size.
@@ -589,12 +477,8 @@ namespace ignite
/**
* Read next element.
*
- * @param key Pointer to buffer where key element should be stored.
- * Should not be null.
- * @param val Pointer to buffer where value element should be
- * stored. Should not be null.
- *
- * @throw IgniteError if there is no element to read.
+ * @param key Key.
+ * @param val Value.
*/
void GetNext(K* key, V* val)
{
@@ -604,8 +488,7 @@ namespace ignite
/**
* Get map type.
*
- * @return Map type. See MapType for the list of available values
- * and their description.
+ * @return Type.
*/
MapType GetType()
{
@@ -623,9 +506,7 @@ namespace ignite
}
/**
- * Check whether map is NULL.
- *
- * @return True if the map is NULL.
+ * Whether map is NULL.
*/
bool IsNull()
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
index 3104437..473be3d 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_reader.h
@@ -41,17 +41,6 @@ namespace ignite
{
/**
* Binary raw reader.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object.
- *
- * @note User should not store copy of this instance as it can be
- * invalidated as soon as the initially passed to user instance has
- * been destructed. For example this means that if user received an
- * instance of this class as a function argument then he should not
- * store and use copy of this class out of the scope of this
- * function.
*/
class IGNITE_IMPORT_EXPORT BinaryRawReader
{
@@ -59,8 +48,6 @@ namespace ignite
/**
* Constructor.
*
- * Internal method. Should not be used by user.
- *
* @param impl Implementation.
*/
BinaryRawReader(ignite::impl::binary::BinaryReaderImpl* impl);
@@ -218,14 +205,14 @@ namespace ignite
int32_t ReadDoubleArray(double* res, int32_t len);
/**
- * Read Guid. Maps to "java.util.UUID" type in Java.
+ * Read Guid. Maps to "UUID" type in Java.
*
* @return Result.
*/
Guid ReadGuid();
/**
- * Read array of Guids. Maps to "java.util.UUID[]" type in Java.
+ * Read array of Guids. Maps to "UUID[]" type in Java.
*
* @param res Array to store data to.
* @param len Expected length of array.
@@ -237,14 +224,14 @@ namespace ignite
int32_t ReadGuidArray(Guid* res, int32_t len);
/**
- * Read Date. Maps to "java.util.Date" type in Java.
+ * Read Date. Maps to "Date" type in Java.
*
* @return Result.
*/
Date ReadDate();
/**
- * Read array of Dates. Maps to "java.util.Date[]" type in Java.
+ * Read array of Dates. Maps to "Date[]" type in Java.
*
* @param res Array to store data to.
* @param len Expected length of array.
@@ -256,14 +243,14 @@ namespace ignite
int32_t ReadDateArray(Date* res, int32_t len);
/**
- * Read Timestamp. Maps to "java.sql.Timestamp" type in Java.
+ * Read Timestamp. Maps to "Timestamp" type in Java.
*
* @return Result.
*/
Timestamp ReadTimestamp();
/**
- * Read array of Timestamps. Maps to "java.sql.Timestamp[]" type in Java.
+ * Read array of Timestamps. Maps to "Timestamp[]" type in Java.
*
* @param res Array to store data to.
* @param len Expected length of array.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
index c960406..41cfef7 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_raw_writer.h
@@ -40,17 +40,6 @@ namespace ignite
{
/**
* Binary raw writer.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object.
- *
- * @note User should not store copy of this instance as it can be
- * invalidated as soon as the initially passed to user instance has
- * been destructed. For example this means that if user received an
- * instance of this class as a function argument then he should not
- * store and use copy of this class out of the scope of this
- * function.
*/
class IGNITE_IMPORT_EXPORT BinaryRawWriter
{
@@ -58,8 +47,6 @@ namespace ignite
/**
* Constructor.
*
- * Internal method. Should not be used by user.
- *
* @param impl Implementation.
*/
BinaryRawWriter(ignite::impl::binary::BinaryWriterImpl* impl);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
index ac70f39..3e5bbb1 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_reader.h
@@ -39,17 +39,6 @@ namespace ignite
{
/**
* Binary reader.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object.
- *
- * @note User should not store copy of this instance as it can be
- * invalidated as soon as the initially passed to user instance has
- * been destructed. For example this means that if user received an
- * instance of this class as a function argument then he should not
- * store and use copy of this class out of the scope of this
- * function.
*/
class IGNITE_IMPORT_EXPORT BinaryReader
{
@@ -57,8 +46,6 @@ namespace ignite
/**
* Constructor.
*
- * Internal method. Should not be used by user.
- *
* @param impl Implementation.
*/
BinaryReader(ignite::impl::binary::BinaryReaderImpl* impl);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
index 1923694..1bee82a 100644
--- a/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
+++ b/modules/platforms/cpp/binary/include/ignite/binary/binary_writer.h
@@ -36,17 +36,6 @@ namespace ignite
{
/**
* Binary writer.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object.
- *
- * @note User should not store copy of this instance as it can be
- * invalidated as soon as the initially passed to user instance has
- * been destructed. For example this means that if user received an
- * instance of this class as a function argument then he should not
- * store and use copy of this class out of the scope of this
- * function.
*/
class IGNITE_IMPORT_EXPORT BinaryWriter
{
@@ -54,8 +43,6 @@ namespace ignite
/**
* Constructor.
*
- * Internal method. Should not be used by user.
- *
* @param impl Implementation.
*/
BinaryWriter(ignite::impl::binary::BinaryWriterImpl* impl);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/common/include/ignite/date.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/date.h b/modules/platforms/cpp/common/include/ignite/date.h
index ffdebd3..31fe5d0 100644
--- a/modules/platforms/cpp/common/include/ignite/date.h
+++ b/modules/platforms/cpp/common/include/ignite/date.h
@@ -30,7 +30,7 @@
namespace ignite
{
/**
- * %Date type.
+ * Date type.
*/
class IGNITE_IMPORT_EXPORT Date
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/common/include/ignite/ignite_error.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/ignite_error.h b/modules/platforms/cpp/common/include/ignite/ignite_error.h
index 4c0e263..edba67a 100644
--- a/modules/platforms/cpp/common/include/ignite/ignite_error.h
+++ b/modules/platforms/cpp/common/include/ignite/ignite_error.h
@@ -76,7 +76,7 @@ namespace ignite
{
namespace java
{
- /* JNI error constants. */
+ /* Error constants. */
const int IGNITE_JNI_ERR_SUCCESS = 0;
const int IGNITE_JNI_ERR_GENERIC = 1;
const int IGNITE_JNI_ERR_JVM_INIT = 2;
@@ -84,7 +84,7 @@ namespace ignite
}
/**
- * %Ignite error information.
+ * Ignite error information.
*/
class IGNITE_IMPORT_EXPORT IgniteError : public std::exception
{
@@ -119,7 +119,7 @@ namespace ignite
/** Binary error. */
static const int IGNITE_ERR_BINARY = 1002;
- /** Generic %Ignite error. */
+ /** Generic Ignite error. */
static const int IGNITE_ERR_GENERIC = 2000;
/** Illegal argument passed. */
@@ -202,13 +202,12 @@ namespace ignite
static void ThrowIfNeeded(IgniteError& err);
/**
- * Default constructor.
- * Creates empty error. Code is IGNITE_SUCCESS and message is NULL.
+ * Create empty error.
*/
IgniteError();
/**
- * Create error with specific code. Message is set to NULL.
+ * Create error with specific code.
*
* @param code Error code.
*/
@@ -233,7 +232,7 @@ namespace ignite
* Assignment operator.
*
* @param other Other instance.
- * @return *this.
+ * @return Assignment result.
*/
IgniteError& operator=(const IgniteError& other);
@@ -252,7 +251,7 @@ namespace ignite
/**
* Get error message.
*
- * @return Error message. Can be NULL.
+ * @return Error message.
*/
const char* GetText() const IGNITE_NO_THROW;
@@ -265,12 +264,12 @@ namespace ignite
virtual const char* what() const IGNITE_NO_THROW;
/**
- * Initializes IgniteError instance from the JNI error.
+ * Set error.
*
* @param jniCode Error code.
* @param jniCls Error class.
* @param jniMsg Error message.
- * @param err Error. Can not be NULL.
+ * @param err Error.
*/
static void SetError(const int jniCode, const char* jniCls, const char* jniMsg, IgniteError* err);
private:
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/common/include/ignite/timestamp.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/include/ignite/timestamp.h b/modules/platforms/cpp/common/include/ignite/timestamp.h
index 14b83fa..4528e53 100644
--- a/modules/platforms/cpp/common/include/ignite/timestamp.h
+++ b/modules/platforms/cpp/common/include/ignite/timestamp.h
@@ -32,7 +32,7 @@
namespace ignite
{
/**
- * %Timestamp type.
+ * Timestamp type.
*/
class IGNITE_IMPORT_EXPORT Timestamp
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/common/src/ignite_error.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/common/src/ignite_error.cpp b/modules/platforms/cpp/common/src/ignite_error.cpp
index 5acbed2..722214b 100644
--- a/modules/platforms/cpp/common/src/ignite_error.cpp
+++ b/modules/platforms/cpp/common/src/ignite_error.cpp
@@ -14,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <utility>
-
#include <ignite/ignite_error.h>
#include <ignite/common/utils.h>
@@ -63,8 +61,14 @@ namespace ignite
{
IgniteError tmp(other);
- std::swap(code, tmp.code);
- std::swap(msg, tmp.msg);
+ int tmpCode = code;
+ char* tmpMsg = msg;
+
+ code = tmp.code;
+ msg = tmp.msg;
+
+ tmp.code = tmpCode;
+ tmp.msg = tmpMsg;
}
return *this;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache.h b/modules/platforms/cpp/core/include/ignite/cache/cache.h
index 59b7a6a..e60c843 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache.h
@@ -46,15 +46,6 @@ namespace ignite
{
/**
* Main entry point for all Data Grid APIs.
- *
- * Both key and value types should be default-constructable,
- * copy-constructable and assignable. Also BinaryType class
- * template should be specialized for both types.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
*/
template<typename K, typename V>
class IGNITE_IMPORT_EXPORT Cache
@@ -62,23 +53,14 @@ namespace ignite
public:
/**
* Constructor.
- *
- * Internal method. Should not be used by user.
- *
- * @param impl Implementation.
*/
- Cache(impl::cache::CacheImpl* impl) :
- impl(impl)
+ Cache(impl::cache::CacheImpl* impl) : impl(ignite::common::concurrent::SharedPointer<impl::cache::CacheImpl>(impl))
{
// No-op.
}
/**
- * Get name of this cache (null for default cache).
- *
- * This method should only be used on the valid instance.
- *
- * @return Name of this cache (null for default cache).
+ * Name of this cache (null for default cache).
*/
const char* GetName() const
{
@@ -89,8 +71,6 @@ namespace ignite
* Checks whether this cache contains no key-value mappings.
* Semantically equals to Cache.Size(IGNITE_PEEK_MODE_PRIMARY) == 0.
*
- * This method should only be used on the valid instance.
- *
* @return True if cache is empty.
*/
bool IsEmpty()
@@ -108,8 +88,6 @@ namespace ignite
* Checks whether this cache contains no key-value mappings.
* Semantically equals to Cache.Size(IGNITE_PEEK_MODE_PRIMARY) == 0.
*
- * This method should only be used on the valid instance.
- *
* @param err Error.
* @return True if cache is empty.
*/
@@ -121,8 +99,6 @@ namespace ignite
/**
* Check if cache contains mapping for this key.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @return True if cache contains mapping for this key.
*/
@@ -140,8 +116,6 @@ namespace ignite
/**
* Check if cache contains mapping for this key.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @param err Error.
* @return True if cache contains mapping for this key.
@@ -156,8 +130,6 @@ namespace ignite
/**
* Check if cache contains mapping for these keys.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys.
* @return True if cache contains mapping for all these keys.
*/
@@ -175,8 +147,6 @@ namespace ignite
/**
* Check if cache contains mapping for these keys.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys.
* @param err Error.
* @return True if cache contains mapping for all these keys.
@@ -195,8 +165,6 @@ namespace ignite
* This method does not participate in any transactions, however, it may peek at transactional
* value depending on the peek modes used.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @param peekModes Peek modes.
* @return Value.
@@ -219,8 +187,6 @@ namespace ignite
* This method does not participate in any transactions, however, it may peek at transactional
* value depending on the peek modes used.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @param peekModes Peek modes.
* @param err Error.
@@ -243,8 +209,6 @@ namespace ignite
* will be loaded from persistent store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @return Value.
*/
@@ -266,8 +230,6 @@ namespace ignite
* will be loaded from persistent store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key.
* @param err Error.
* @return Value.
@@ -289,8 +251,6 @@ namespace ignite
* will be loaded from persistent store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys.
* @return Map of key-value pairs.
*/
@@ -312,8 +272,6 @@ namespace ignite
* will be loaded from persistent store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys.
* @param err Error.
* @return Map of key-value pairs.
@@ -333,8 +291,6 @@ namespace ignite
* If the cache previously contained a mapping for the key,
* the old value is replaced by the specified value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
*/
@@ -352,8 +308,6 @@ namespace ignite
* If the cache previously contained a mapping for the key,
* the old value is replaced by the specified value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @param err Error.
@@ -370,8 +324,6 @@ namespace ignite
* If write-through is enabled, the stored values will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param vals Key-value pairs to store in cache.
*/
void PutAll(const std::map<K, V>& vals)
@@ -388,8 +340,6 @@ namespace ignite
* If write-through is enabled, the stored values will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param vals Key-value pairs to store in cache.
* @param err Error.
*/
@@ -404,8 +354,6 @@ namespace ignite
* Associates the specified value with the specified key in this cache,
* returning an existing value if one existed.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @return The value associated with the key at the start of the
@@ -426,8 +374,6 @@ namespace ignite
* Associates the specified value with the specified key in this cache,
* returning an existing value if one existed.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @param err Error.
@@ -448,8 +394,6 @@ namespace ignite
* Atomically replaces the value for a given key if and only if there is
* a value currently mapped by the key.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @return The previous value associated with the specified key, or
@@ -470,8 +414,6 @@ namespace ignite
* Atomically replaces the value for a given key if and only if there is
* a value currently mapped by the key.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @param err Error.
@@ -491,8 +433,6 @@ namespace ignite
/**
* Atomically removes the entry for a key only if currently mapped to some value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is associated.
* @return The value if one existed or null if no mapping existed for this key.
*/
@@ -510,8 +450,6 @@ namespace ignite
/**
* Atomically removes the entry for a key only if currently mapped to some value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is associated.
* @param err Error.
* @return The value if one existed or null if no mapping existed for this key.
@@ -530,8 +468,6 @@ namespace ignite
* Atomically associates the specified key with the given value if it is not
* already associated with a value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @return True if a value was set.
@@ -551,8 +487,6 @@ namespace ignite
* Atomically associates the specified key with the given value if it is not
* already associated with a value.
*
- * This method should only be used on the valid instance.
- *
* @param key Key with which the specified value is to be associated.
* @param val Value to be associated with the specified key.
* @param err Error.
@@ -576,8 +510,6 @@ namespace ignite
* If write-through is enabled, the stored value will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
* @return Previously contained value regardless of whether put happened or not
@@ -605,8 +537,6 @@ namespace ignite
* If write-through is enabled, the stored value will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
* @param err Error.
@@ -632,8 +562,6 @@ namespace ignite
* If write-through is enabled, the stored value will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
* @return True if the value was replaced.
@@ -658,8 +586,6 @@ namespace ignite
* If write-through is enabled, the stored value will be persisted to store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param val Value to be associated with the given key.
* @param err Error.
@@ -677,8 +603,6 @@ namespace ignite
* old value passed as argument.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param oldVal Old value to match.
* @param newVal Value to be associated with the given key.
@@ -700,8 +624,6 @@ namespace ignite
* old value passed as argument.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to store in cache.
* @param oldVal Old value to match.
* @param newVal Value to be associated with the given key.
@@ -716,12 +638,8 @@ namespace ignite
}
/**
- * Attempts to evict all entries associated with keys.
- *
- * @note Entry will be evicted only if it's not used (not
- * participating in any locks or transactions).
- *
- * This method should only be used on the valid instance.
+ * Attempts to evict all entries associated with keys. Note, that entry will be evicted only
+ * if it's not used (not participating in any locks or transactions).
*
* @param keys Keys to evict from cache.
*/
@@ -735,12 +653,8 @@ namespace ignite
}
/**
- * Attempts to evict all entries associated with keys.
- *
- * @note Entry will be evicted only if it's not used (not
- * participating in any locks or transactions).
- *
- * This method should only be used on the valid instance.
+ * Attempts to evict all entries associated with keys. Note, that entry will be evicted only
+ * if it's not used (not participating in any locks or transactions).
*
* @param keys Keys to evict from cache.
* @param err Error.
@@ -754,8 +668,6 @@ namespace ignite
/**
* Clear cache.
- *
- * This method should only be used on the valid instance.
*/
void Clear()
{
@@ -769,8 +681,6 @@ namespace ignite
/**
* Clear cache.
*
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void Clear(IgniteError& err)
@@ -782,8 +692,6 @@ namespace ignite
* Clear entry from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to clear.
*/
void Clear(const K& key)
@@ -799,8 +707,6 @@ namespace ignite
* Clear entry from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to clear.
* @param err Error.
*/
@@ -815,8 +721,6 @@ namespace ignite
* Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys to clear.
*/
void ClearAll(const std::set<K>& keys)
@@ -832,8 +736,6 @@ namespace ignite
* Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys to clear.
* @param err Error.
*/
@@ -847,12 +749,9 @@ namespace ignite
/**
* Clear entry from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
- *
- * @note This operation is local as it merely clears an entry from local cache, it does not
+ * Note that this operation is local as it merely clears an entry from local cache, it does not
* remove entries from remote caches.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to clear.
*/
void LocalClear(const K& key)
@@ -867,12 +766,9 @@ namespace ignite
/**
* Clear entry from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
- *
- * @note This operation is local as it merely clears an entry from local cache, it does not
+ * Note that this operation is local as it merely clears an entry from local cache, it does not
* remove entries from remote caches.
*
- * This method should only be used on the valid instance.
- *
* @param key Key to clear.
* @param err Error.
*/
@@ -886,12 +782,9 @@ namespace ignite
/**
* Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
- *
- * @note This operation is local as it merely clears entries from local cache, it does not
+ * Note that this operation is local as it merely clears entries from local cache, it does not
* remove entries from remote caches.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys to clear.
*/
void LocalClearAll(const std::set<K>& keys)
@@ -906,12 +799,9 @@ namespace ignite
/**
* Clear entries from the cache and swap storage, without notifying listeners or CacheWriters.
* Entry is cleared only if it is not currently locked, and is not participating in a transaction.
- *
- * @note This operation is local as it merely clears entries from local cache, it does not
+ * Note that this operation is local as it merely clears entries from local cache, it does not
* remove entries from remote caches.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys to clear.
* @param err Error.
*/
@@ -932,8 +822,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key whose mapping is to be removed from cache.
* @return False if there was no matching key.
*/
@@ -958,8 +846,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key whose mapping is to be removed from cache.
* @param err Error.
* @return False if there was no matching key.
@@ -976,8 +862,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key whose mapping is to be removed from cache.
* @param val Value to match against currently cached value.
* @return True if entry was removed, false otherwise.
@@ -998,8 +882,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param key Key whose mapping is to be removed from cache.
* @param val Value to match against currently cached value.
* @param err Error.
@@ -1017,8 +899,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys whose mappings are to be removed from cache.
*/
void RemoveAll(const std::set<K>& keys)
@@ -1035,8 +915,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param keys Keys whose mappings are to be removed from cache.
* @param err Error.
*/
@@ -1052,8 +930,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void RemoveAll()
@@ -1070,8 +946,6 @@ namespace ignite
* If write-through is enabled, the value will be removed from store.
* This method is transactional and will enlist the entry into ongoing transaction if there is one.
*
- * This method should only be used on the valid instance.
- *
* @param err Error.
*/
void RemoveAll(IgniteError& err)
@@ -1082,8 +956,6 @@ namespace ignite
/**
* Gets the number of all entries cached on this node.
*
- * This method should only be used on the valid instance.
- *
* @return Cache size on this node.
*/
int32_t LocalSize()
@@ -1094,8 +966,6 @@ namespace ignite
/**
* Gets the number of all entries cached on this node.
*
- * This method should only be used on the valid instance.
- *
* @param err Error.
* @return Cache size on this node.
*/
@@ -1107,8 +977,6 @@ namespace ignite
/**
* Gets the number of all entries cached on this node.
*
- * This method should only be used on the valid instance.
- *
* @param Peek modes.
* @return Cache size on this node.
*/
@@ -1126,8 +994,6 @@ namespace ignite
/**
* Gets the number of all entries cached on this node.
*
- * This method should only be used on the valid instance.
- *
* @param Peek modes.
* @param err Error.
* @return Cache size on this node.
@@ -1139,9 +1005,7 @@ namespace ignite
/**
* Gets the number of all entries cached across all nodes.
- * @note this operation is distributed and will query all participating nodes for their cache sizes.
- *
- * This method should only be used on the valid instance.
+ * NOTE: this operation is distributed and will query all participating nodes for their cache sizes.
*
* @return Cache size across all nodes.
*/
@@ -1152,9 +1016,7 @@ namespace ignite
/**
* Gets the number of all entries cached across all nodes.
- * @note This operation is distributed and will query all participating nodes for their cache sizes.
- *
- * This method should only be used on the valid instance.
+ * NOTE: this operation is distributed and will query all participating nodes for their cache sizes.
*
* @param err Error.
* @return Cache size across all nodes.
@@ -1166,9 +1028,7 @@ namespace ignite
/**
* Gets the number of all entries cached across all nodes.
- * @note This operation is distributed and will query all participating nodes for their cache sizes.
- *
- * This method should only be used on the valid instance.
+ * NOTE: this operation is distributed and will query all participating nodes for their cache sizes.
*
* @param Peek modes.
* @return Cache size across all nodes.
@@ -1186,9 +1046,7 @@ namespace ignite
/**
* Gets the number of all entries cached across all nodes.
- * @note This operation is distributed and will query all participating nodes for their cache sizes.
- *
- * This method should only be used on the valid instance.
+ * NOTE: this operation is distributed and will query all participating nodes for their cache sizes.
*
* @param Peek modes.
* @param err Error.
@@ -1202,8 +1060,6 @@ namespace ignite
/**
* Perform SQL query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @return Query cursor.
*/
@@ -1221,8 +1077,6 @@ namespace ignite
/**
* Perform SQL query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @param err Error.
* @return Query cursor.
@@ -1237,8 +1091,6 @@ namespace ignite
/**
* Perform text query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @return Query cursor.
*/
@@ -1256,8 +1108,6 @@ namespace ignite
/**
* Perform text query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @param err Error.
* @return Query cursor.
@@ -1272,8 +1122,6 @@ namespace ignite
/**
* Perform scan query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @return Query cursor.
*/
@@ -1291,8 +1139,6 @@ namespace ignite
/**
* Perform scan query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @param err Error.
* @return Query cursor.
@@ -1307,8 +1153,6 @@ namespace ignite
/**
* Perform sql fields query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @return Query cursor.
*/
@@ -1326,8 +1170,6 @@ namespace ignite
/**
* Perform sql fields query.
*
- * This method should only be used on the valid instance.
- *
* @param qry Query.
* @param err Error.
* @return Query cursor.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
index 9810600..f709650 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/cache_entry.h
@@ -30,7 +30,7 @@ namespace ignite
namespace cache
{
/**
- * %Cache entry class template.
+ * Cache entry class template.
*
* Both key and value types should be default-constructable,
* copy-constructable and assignable.
@@ -67,10 +67,10 @@ namespace ignite
*
* @param other Other instance.
*/
- CacheEntry(const CacheEntry& other) :
- key(other.key), val(other.val)
+ CacheEntry(const CacheEntry& other)
{
- // No-op.
+ key = other.key;
+ val = other.val;
}
/**
@@ -82,8 +82,10 @@ namespace ignite
{
if (this != &other)
{
- key = other.key;
- val = other.val;
+ CacheEntry tmp(other);
+
+ std::swap(key, tmp.key);
+ std::swap(val, tmp.val);
}
return *this;
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
index 65578ce..933bd60 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_argument.h
@@ -27,11 +27,11 @@
#include "ignite/binary/binary_raw_writer.h"
namespace ignite
-{
+{
namespace cache
{
namespace query
- {
+ {
/**
* Base class for all query arguments.
*/
@@ -49,24 +49,18 @@ namespace ignite
/**
* Copy argument.
*
- * @return Copy of this argument instance.
+ * @return Copy.
*/
virtual QueryArgumentBase* Copy() const = 0;
/**
- * Write argument using provided writer.
- *
- * @param writer Writer to use to write this argument.
+ * Write argument.
*/
virtual void Write(ignite::binary::BinaryRawWriter& writer) = 0;
};
/**
- * Query argument class template.
- *
- * Template argument type should be copy-constructable and
- * assignable. Also BinaryType class template should be specialized
- * for this type.
+ * Query argument.
*/
template<typename T>
class QueryArgument : public QueryArgumentBase
@@ -77,8 +71,7 @@ namespace ignite
*
* @param val Value.
*/
- QueryArgument(const T& val) :
- val(val)
+ QueryArgument(const T& val) : val(val)
{
// No-op.
}
@@ -88,22 +81,26 @@ namespace ignite
*
* @param other Other instance.
*/
- QueryArgument(const QueryArgument& other) :
- val(other.val)
+ QueryArgument(const QueryArgument& other)
{
- // No-op.
+ val = other.val;
}
/**
* Assignment operator.
*
* @param other Other instance.
- * @return *this.
*/
QueryArgument& operator=(const QueryArgument& other)
{
if (this != &other)
- val = other.val;
+ {
+ QueryArgument tmp(other);
+
+ T val0 = val;
+ val = tmp.val;
+ tmp.val = val0;
+ }
return *this;
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
index 4c46662..45eb54a 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_cursor.h
@@ -42,13 +42,7 @@ namespace ignite
* Query cursor class template.
*
* Both key and value types should be default-constructable,
- * copy-constructable and assignable. Also BinaryType class
- * template should be specialized for both types.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
+ * copy-constructable and assignable.
*/
template<typename K, typename V>
class QueryCursor
@@ -79,12 +73,11 @@ namespace ignite
/**
* Check whether next entry exists.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return True if next entry exists.
- *
- * @throw IgniteError class instance in case of failure.
*/
bool HasNext()
{
@@ -124,12 +117,11 @@ namespace ignite
/**
* Get next entry.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return Next entry.
- *
- * @throw IgniteError class instance in case of failure.
*/
CacheEntry<K, V> GetNext()
{
@@ -183,12 +175,11 @@ namespace ignite
/**
* Get all entries.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @param Vector where query entries will be stored.
- *
- * @throw IgniteError class instance in case of failure.
*/
void GetAll(std::vector<CacheEntry<K, V>>& res)
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_cursor.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_cursor.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_cursor.h
index 3946e1c..3952ece 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_cursor.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_cursor.h
@@ -41,11 +41,6 @@ namespace ignite
{
/**
* Query fields cursor.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
*/
class QueryFieldsCursor
{
@@ -75,12 +70,11 @@ namespace ignite
/**
* Check whether next entry exists.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return True if next entry exists.
- *
- * @throw IgniteError class instance in case of failure.
*/
bool HasNext()
{
@@ -120,12 +114,11 @@ namespace ignite
/**
* Get next entry.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return Next entry.
- *
- * @throw IgniteError class instance in case of failure.
*/
QueryFieldsRow GetNext()
{
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_row.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_row.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_row.h
index d3ac2de..521da76 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_row.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_fields_row.h
@@ -40,11 +40,6 @@ namespace ignite
{
/**
* Query fields cursor.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
*/
class QueryFieldsRow
{
@@ -52,7 +47,8 @@ namespace ignite
/**
* Default constructor.
*
- * Constructed instance is not valid and thus can not be used.
+ * Constructed instance is not valid and thus can not be used
+ * as a cursor.
*/
QueryFieldsRow() : impl(0)
{
@@ -73,12 +69,11 @@ namespace ignite
/**
* Check whether next entry exists.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return True if next entry exists.
- *
- * @throw IgniteError class instance in case of failure.
*/
bool HasNext()
{
@@ -118,16 +113,11 @@ namespace ignite
/**
* Get next entry.
- *
- * Template argument type should be default-constructable,
- * copy-constructable and assignable. Also BinaryType class
- * template should be specialized for this type.
+ * Throws IgniteError class instance in case of failure.
*
* This method should only be used on the valid instance.
*
* @return Next entry.
- *
- * @throw IgniteError class instance in case of failure.
*/
template<typename T>
T GetNext()
@@ -145,10 +135,6 @@ namespace ignite
* Get next entry.
* Properly sets error param in case of failure.
*
- * Template argument type should be default-constructable,
- * copy-constructable and assignable. Also BinaryType class
- * template should be specialized for this type.
- *
* This method should only be used on the valid instance.
*
* @param err Used to set operation result.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
index 4228ba5..d4dd565 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_scan.h
@@ -29,11 +29,11 @@
#include "ignite/binary/binary_raw_writer.h"
namespace ignite
-{
+{
namespace cache
{
namespace query
- {
+ {
/**
* Scan query.
*/
@@ -47,7 +47,7 @@ namespace ignite
{
// No-op.
}
-
+
/**
* Constructor.
*
@@ -57,7 +57,7 @@ namespace ignite
{
// No-op.
}
-
+
/**
* Get partition to scan.
*
@@ -117,7 +117,7 @@ namespace ignite
{
this->loc = loc;
}
-
+
/**
* Write query info to the stream.
*
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
index f7a00fa..d80fa51 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
@@ -31,11 +31,11 @@
#include "ignite/binary/binary_raw_writer.h"
namespace ignite
-{
+{
namespace cache
{
namespace query
- {
+ {
/**
* Sql query.
*/
@@ -48,8 +48,8 @@ namespace ignite
* @param type Type name.
* @param sql SQL string.
*/
- SqlQuery(const std::string& type, const std::string& sql)
- : type(type), sql(sql), pageSize(1024), loc(false), args()
+ SqlQuery(const std::string& type, const std::string& sql) : type(type), sql(sql), pageSize(1024),
+ loc(false), args()
{
// No-op.
}
@@ -59,8 +59,7 @@ namespace ignite
*
* @param other Other instance.
*/
- SqlQuery(const SqlQuery& other) :
- type(other.type), sql(other.sql), pageSize(other.pageSize),
+ SqlQuery(const SqlQuery& other) : type(other.type), sql(other.sql), pageSize(other.pageSize),
loc(other.loc), args()
{
args.reserve(other.args.size());
@@ -200,10 +199,6 @@ namespace ignite
/**
* Add argument.
*
- * Template argument type should be copy-constructable and
- * assignable. Also BinaryType class template should be specialized
- * for this type.
- *
* @param arg Argument.
*/
template<typename T>
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
index e21fc93..4792d34 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
@@ -47,8 +47,7 @@ namespace ignite
*
* @param sql SQL string.
*/
- SqlFieldsQuery(const std::string& sql) :
- sql(sql), pageSize(1024), loc(false), args()
+ SqlFieldsQuery(const std::string& sql) : sql(sql), pageSize(1024), loc(false), args()
{
// No-op.
}
@@ -59,8 +58,7 @@ namespace ignite
* @param sql SQL string.
* @param loc Whether query should be executed locally.
*/
- SqlFieldsQuery(const std::string& sql, bool loc) :
- sql(sql), pageSize(1024), loc(false), args()
+ SqlFieldsQuery(const std::string& sql, bool loc) : sql(sql), pageSize(1024), loc(false), args()
{
// No-op.
}
@@ -70,8 +68,7 @@ namespace ignite
*
* @param other Other instance.
*/
- SqlFieldsQuery(const SqlFieldsQuery& other) :
- sql(other.sql), pageSize(other.pageSize), loc(other.loc),
+ SqlFieldsQuery(const SqlFieldsQuery& other) : sql(other.sql), pageSize(other.pageSize), loc(other.loc),
args()
{
args.reserve(other.args.size());
@@ -109,7 +106,7 @@ namespace ignite
for (std::vector<QueryArgumentBase*>::iterator it = args.begin(); it != args.end(); ++it)
delete *it;
}
-
+
/**
* Get SQL string.
*
@@ -173,10 +170,6 @@ namespace ignite
/**
* Add argument.
*
- * Template argument type should be copy-constructable and
- * assignable. Also BinaryType class template should be specialized
- * for this type.
- *
* @param arg Argument.
*/
template<typename T>
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/ignite.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite.h b/modules/platforms/cpp/core/include/ignite/ignite.h
index 311dff2..e4f9208 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite.h
@@ -31,12 +31,7 @@
namespace ignite
{
/**
- * Main interface to operate with %Ignite.
- *
- * This class implemented as a reference to an implementation so copying
- * of this class instance will only create another reference to the same
- * underlying object. Underlying object released automatically once all
- * the instances are destructed.
+ * Main interface to operate with Ignite.
*/
class IGNITE_IMPORT_EXPORT Ignite
{
@@ -62,8 +57,6 @@ namespace ignite
/**
* Get cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @return Cache.
*/
@@ -82,8 +75,6 @@ namespace ignite
/**
* Get cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @param err Error;
* @return Cache.
@@ -99,8 +90,6 @@ namespace ignite
/**
* Get or create cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @return Cache.
*/
@@ -119,8 +108,6 @@ namespace ignite
/**
* Get or create cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @param err Error;
* @return Cache.
@@ -136,8 +123,6 @@ namespace ignite
/**
* Create cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @return Cache.
*/
@@ -156,8 +141,6 @@ namespace ignite
/**
* Create cache.
*
- * This method should only be used on the valid instance.
- *
* @param name Cache name.
* @param err Error;
* @return Cache.
@@ -173,8 +156,6 @@ namespace ignite
/**
* Get transactions.
*
- * This method should only be used on the valid instance.
- *
* @return Transaction class instance.
*/
transactions::Transactions GetTransactions();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/ignite_configuration.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignite_configuration.h b/modules/platforms/cpp/core/include/ignite/ignite_configuration.h
index 65c4550..ee59c11 100644
--- a/modules/platforms/cpp/core/include/ignite/ignite_configuration.h
+++ b/modules/platforms/cpp/core/include/ignite/ignite_configuration.h
@@ -32,7 +32,7 @@
namespace ignite
{
/**
- * %Ignite configuration.
+ * Ignite configuration.
*/
struct IgniteConfiguration
{
@@ -58,7 +58,7 @@ namespace ignite
std::list<std::string> jvmOpts;
/**
- * Default constructor.
+ * Constructor.
*/
IgniteConfiguration() : igniteHome(), springCfgPath(), jvmLibPath(), jvmClassPath(),
jvmInitMem(512), jvmMaxMem(1024), jvmOpts()
http://git-wip-us.apache.org/repos/asf/ignite/blob/f70c81ba/modules/platforms/cpp/core/include/ignite/ignition.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/ignition.h b/modules/platforms/cpp/core/include/ignite/ignition.h
index f88efe5..31f5b0b 100644
--- a/modules/platforms/cpp/core/include/ignite/ignition.h
+++ b/modules/platforms/cpp/core/include/ignite/ignition.h
@@ -31,7 +31,7 @@
namespace ignite
{
/**
- * This class defines a factory for the main %Ignite API.
+ * This class defines a factory for the main Ignite API.
*/
class IGNITE_IMPORT_EXPORT Ignition
{