You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2017/11/02 23:08:43 UTC
[geode-native] 02/02: GEODE-3754: Fixes formatting.
This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
commit f9584c47a55709cd839e390e488fa45140052f6c
Author: Jacob Barrett <jb...@pivotal.io>
AuthorDate: Thu Nov 2 11:05:56 2017 -0700
GEODE-3754: Fixes formatting.
---
cppcache/include/geode/Cache.hpp | 3 +-
cppcache/include/geode/DataInput.hpp | 17 +++---
cppcache/include/geode/PdxInstance.hpp | 10 ++--
cppcache/include/geode/PdxInstanceFactory.hpp | 2 +-
cppcache/include/geode/PersistenceManager.hpp | 6 +--
.../integration-test/BuiltinCacheableWrappers.hpp | 2 +-
cppcache/integration-test/ThinClientDistOps2.hpp | 3 +-
.../ThinClientPutAllWithCallBack.hpp | 1 -
cppcache/integration-test/ThinClientPutGetAll.hpp | 3 +-
cppcache/integration-test/testDataOutput.cpp | 2 +-
.../integration-test/testThinClientBigValue.cpp | 6 +--
.../testThinClientFixedPartitionResolver.cpp | 3 +-
.../testThinClientInterestNotify.cpp | 3 +-
.../integration-test/testThinClientPRSingleHop.cpp | 6 +--
cppcache/src/CacheableDate.cpp | 4 +-
cppcache/src/ClientProxyMembershipID.cpp | 21 ++++----
cppcache/src/EventId.cpp | 2 +-
cppcache/src/FarSideEntryOp.cpp | 4 +-
cppcache/src/FunctionService.cpp | 2 +-
cppcache/src/LocalRegion.cpp | 5 +-
cppcache/src/LocalRegion.hpp | 11 ++--
cppcache/src/PdxFieldType.cpp | 2 +-
cppcache/src/PdxInstanceFactoryImpl.cpp | 4 +-
cppcache/src/PdxInstanceFactoryImpl.hpp | 2 +-
cppcache/src/PdxInstanceImpl.cpp | 26 ++++-----
cppcache/src/PdxInstanceImpl.hpp | 8 +--
cppcache/src/PdxLocalWriter.cpp | 3 +-
cppcache/src/PdxType.cpp | 8 +--
cppcache/src/ProxyRegion.hpp | 3 +-
cppcache/src/RegionAttributes.cpp | 16 +++---
cppcache/src/RegionEntry.cpp | 4 +-
cppcache/src/RemoteQueryService.cpp | 2 +-
cppcache/src/Struct.cpp | 6 +--
cppcache/src/TXCommitMessage.cpp | 6 +--
cppcache/src/TcrConnection.cpp | 37 ++++++++-----
cppcache/src/TcrMessage.cpp | 62 +++++++++++-----------
cppcache/src/TcrMessage.hpp | 3 +-
cppcache/src/ThinClientRegion.cpp | 23 ++++----
cppcache/src/VersionTag.cpp | 2 +-
cppcache/src/VersionedCacheableObjectPartList.cpp | 3 +-
cppcache/test/DataInputTest.cpp | 2 +-
cppcache/test/StructSetTest.cpp | 13 +++--
42 files changed, 176 insertions(+), 175 deletions(-)
diff --git a/cppcache/include/geode/Cache.hpp b/cppcache/include/geode/Cache.hpp
index 3039969..c03d827 100644
--- a/cppcache/include/geode/Cache.hpp
+++ b/cppcache/include/geode/Cache.hpp
@@ -196,8 +196,7 @@ class CPPCACHE_EXPORT Cache : public GeodeCache,
*/
virtual RegionServicePtr createAuthenticatedView(
- PropertiesPtr userSecurityProperties,
- const char* poolName = nullptr);
+ PropertiesPtr userSecurityProperties, const char* poolName = nullptr);
/**
* Get the CacheTransactionManager instance for this Cache.
diff --git a/cppcache/include/geode/DataInput.hpp b/cppcache/include/geode/DataInput.hpp
index 9b99514..4638487 100644
--- a/cppcache/include/geode/DataInput.hpp
+++ b/cppcache/include/geode/DataInput.hpp
@@ -57,7 +57,6 @@ class DataInputInternal;
*/
class CPPCACHE_EXPORT DataInput {
public:
-
/**
* Read a signed byte from the <code>DataInput</code>.
*
@@ -165,7 +164,7 @@ class CPPCACHE_EXPORT DataInput {
*
* @return 16-bit signed integer read from stream
*/
- inline int16_t readInt16() {
+ inline int16_t readInt16() {
checkBufferSize(2);
int16_t tmp = *(m_buf++);
tmp = static_cast<int16_t>((tmp << 8) | *(m_buf++));
@@ -237,7 +236,7 @@ class CPPCACHE_EXPORT DataInput {
int32_t result = code;
if (result > 252) { // 252 is java's ((byte)-4 && 0xFF)
if (code == 0xFE) {
- uint16_t val = readInt16();
+ uint16_t val = readInt16();
result = val;
} else if (code == 0xFD) {
uint32_t val = readInt32();
@@ -298,7 +297,7 @@ class CPPCACHE_EXPORT DataInput {
uint64_t ll;
} v;
v.ll = readInt64();
- return v.d;
+ return v.d;
}
/**
@@ -537,7 +536,7 @@ class CPPCACHE_EXPORT DataInput {
*/
template <class PTR>
inline std::shared_ptr<PTR> readObject(
- bool throwOnError = DINP_THROWONERROR_DEFAULT) {
+ bool throwOnError = DINP_THROWONERROR_DEFAULT) {
SerializablePtr sPtr = readObjectInternal();
if (throwOnError) {
return std::dynamic_pointer_cast<PTR>(sPtr);
@@ -547,13 +546,13 @@ class CPPCACHE_EXPORT DataInput {
}
inline bool readNativeBool() {
- read(); // ignore type id
+ read(); // ignore type id
return readBoolean();
}
inline int32_t readNativeInt32() {
- read(); // ignore type id
+ read(); // ignore type id
return readInt32();
}
@@ -919,9 +918,7 @@ class CPPCACHE_EXPORT DataInput {
}
}
- inline char readPdxChar() {
- return static_cast<char>(readInt16());
- }
+ inline char readPdxChar() { return static_cast<char>(readInt16()); }
inline void _checkBufferSize(int32_t size, int32_t line) {
if ((m_bufLength - (m_buf - m_bufHead)) < size) {
diff --git a/cppcache/include/geode/PdxInstance.hpp b/cppcache/include/geode/PdxInstance.hpp
index a64fd81..e8dc9fa 100644
--- a/cppcache/include/geode/PdxInstance.hpp
+++ b/cppcache/include/geode/PdxInstance.hpp
@@ -85,7 +85,7 @@ class CPPCACHE_EXPORT PdxInstance : public PdxSerializable {
* @see serializationRegistry->addPdxType
* @see PdxInstance#hasField
*/
- virtual CacheablePtr getCacheableField(const char *fieldname) const = 0;
+ virtual CacheablePtr getCacheableField(const char* fieldname) const = 0;
/**
* Reads the named field and set its value in bool type out param.
@@ -96,7 +96,7 @@ class CPPCACHE_EXPORT PdxInstance : public PdxSerializable {
*
* @see PdxInstance#hasField
*/
- virtual bool getBooleanField(const char *fieldname) const = 0;
+ virtual bool getBooleanField(const char* fieldname) const = 0;
/**
* Reads the named field and set its value in signed char type out param.
@@ -118,7 +118,7 @@ class CPPCACHE_EXPORT PdxInstance : public PdxSerializable {
*
* @see PdxInstance#hasField
*/
- virtual int16_t getShortField(const char *fieldname) const = 0;
+ virtual int16_t getShortField(const char* fieldname) const = 0;
/**
* Reads the named field and set its value in int32_t type out param.
@@ -369,7 +369,7 @@ class CPPCACHE_EXPORT PdxInstance : public PdxSerializable {
* @see PdxInstance#hasField
*/
virtual CacheableDatePtr getCacheableDateField(
- const char* fieldname) const = 0;
+ const char* fieldname) const = 0;
/**
* Reads the named field and set its value in array of byte arrays type out
@@ -402,7 +402,7 @@ class CPPCACHE_EXPORT PdxInstance : public PdxSerializable {
* @see PdxInstance#hasField
*/
virtual CacheableObjectArrayPtr getCacheableObjectArrayField(
- const char* fieldname) const = 0;
+ const char* fieldname) const = 0;
/**
* Checks if the named field was {@link PdxWriter#markIdentityField}marked as
diff --git a/cppcache/include/geode/PdxInstanceFactory.hpp b/cppcache/include/geode/PdxInstanceFactory.hpp
index e2b134f..b7928aa 100644
--- a/cppcache/include/geode/PdxInstanceFactory.hpp
+++ b/cppcache/include/geode/PdxInstanceFactory.hpp
@@ -81,7 +81,7 @@ class CPPCACHE_EXPORT PdxInstanceFactory {
* or fieldName is nullptr or empty.
*/
virtual PdxInstanceFactoryPtr writeChar(const char* fieldName,
- char16_t value) = 0;
+ char16_t value) = 0;
/**
* Writes the named field with the given value to the serialized form.
diff --git a/cppcache/include/geode/PersistenceManager.hpp b/cppcache/include/geode/PersistenceManager.hpp
index 338168b..4b9c065 100644
--- a/cppcache/include/geode/PersistenceManager.hpp
+++ b/cppcache/include/geode/PersistenceManager.hpp
@@ -88,7 +88,8 @@ class CPPCACHE_EXPORT PersistenceManager {
* @throws InitfailedException if the persistence manager cannot be
* initialized.
*/
- virtual void init(const RegionPtr& region, const PropertiesPtr& diskProperties) = 0;
+ virtual void init(const RegionPtr& region,
+ const PropertiesPtr& diskProperties) = 0;
/**
* Reads the value for the key from the disk.
@@ -113,8 +114,7 @@ class CPPCACHE_EXPORT PersistenceManager {
* @throws RegionDestroyedException is the region is already destroyed.
* @throws EntryNotFoundException if the entry is not found on the disk.
*/
- virtual void destroy(const CacheableKeyPtr& key,
- void*& PersistenceInfo) = 0;
+ virtual void destroy(const CacheableKeyPtr& key, void*& PersistenceInfo) = 0;
/**
* Closes the persistence manager instance.
diff --git a/cppcache/integration-test/BuiltinCacheableWrappers.hpp b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
index 8969460..ed2f58b 100644
--- a/cppcache/integration-test/BuiltinCacheableWrappers.hpp
+++ b/cppcache/integration-test/BuiltinCacheableWrappers.hpp
@@ -668,7 +668,7 @@ class CacheableWideCharWrapper : public CacheableWrapper {
virtual void initRandomValue(int32_t maxSize) {
m_cacheableObject =
- CacheableCharacter::create(CacheableHelper::random<char16_t>(SHRT_MAX));
+ CacheableCharacter::create(CacheableHelper::random<char16_t>(SHRT_MAX));
}
virtual uint32_t getCheckSum(const CacheablePtr object) const {
diff --git a/cppcache/integration-test/ThinClientDistOps2.hpp b/cppcache/integration-test/ThinClientDistOps2.hpp
index f3fe888..fafa461 100644
--- a/cppcache/integration-test/ThinClientDistOps2.hpp
+++ b/cppcache/integration-test/ThinClientDistOps2.hpp
@@ -234,7 +234,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, Client1GetAll_Pool)
CacheableKeyPtr key0 = CacheableString::create(_keys[0]);
CacheableKeyPtr key1 = CacheableString::create(_keys[1]);
- getHelper()->createRegionAndAttachPool(_regionNames[0], USE_ACK, poolName);
+ getHelper()->createRegionAndAttachPool(_regionNames[0], USE_ACK,
+ poolName);
reg0 = getHelper()->getRegion(_regionNames[0]);
// check for IllegalArgumentException for empty key list
keys0.clear();
diff --git a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
index daaf025..767ae64 100644
--- a/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
+++ b/cppcache/integration-test/ThinClientPutAllWithCallBack.hpp
@@ -492,7 +492,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, PutAllOps)
getAllkeys.push_back(CacheableKey::create(key));
}
-
const auto values = regPtr0->getAll(getAllkeys);
ASSERT(values.size() == 500, "GetAll should return 500 entries.");
diff --git a/cppcache/integration-test/ThinClientPutGetAll.hpp b/cppcache/integration-test/ThinClientPutGetAll.hpp
index 58d701b..16f222c 100644
--- a/cppcache/integration-test/ThinClientPutGetAll.hpp
+++ b/cppcache/integration-test/ThinClientPutGetAll.hpp
@@ -338,8 +338,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, putallAndGetallPdxWithCallBackArg)
keys1.push_back(CacheableInt32::create(28));
keys1.push_back(CacheableInt32::create(29));
keys1.push_back(CacheableInt32::create(30));
- auto valuesMap =
- regPtr0->getAll(keys1, CacheableInt32::create(1000));
+ auto valuesMap = regPtr0->getAll(keys1, CacheableInt32::create(1000));
LOG("GetallPdxWithCallBackArg on Pdx objects completed.");
ASSERT(valuesMap.size() == keys1.size(), "getAll size did not match");
diff --git a/cppcache/integration-test/testDataOutput.cpp b/cppcache/integration-test/testDataOutput.cpp
index 5051378..7a94f95 100644
--- a/cppcache/integration-test/testDataOutput.cpp
+++ b/cppcache/integration-test/testDataOutput.cpp
@@ -60,7 +60,7 @@ BEGIN_TEST(Byte)
ASSERT(buffer[0] == (uint8_t)0x11, "expected 0x11.");
DataInputInternal dataInput(buffer, dataOutput.getBufferLength(), nullptr);
- const auto result = dataInput.read();
+ const auto result = dataInput.read();
ASSERT(result == (uint8_t)0x11, "expected 0x11");
}
END_TEST(Byte)
diff --git a/cppcache/integration-test/testThinClientBigValue.cpp b/cppcache/integration-test/testThinClientBigValue.cpp
index ba2d17a..c88065f 100644
--- a/cppcache/integration-test/testThinClientBigValue.cpp
+++ b/cppcache/integration-test/testThinClientBigValue.cpp
@@ -362,14 +362,14 @@ DUNIT_TASK(CLIENT2, VerifyUpdatedManyPutsInt64GetAll)
auto entry = regPtr->getEntry(key);
ASSERT(entry != nullptr, "expected non-null entry");
auto valPtr = entry->getValue();
- //std::dynamic_pointer_cast<CacheableString>(entry->getValue());
+ // std::dynamic_pointer_cast<CacheableString>(entry->getValue());
ASSERT(valPtr != nullptr, "expected non-null value");
- //ASSERT(valPtr->length() == 207, "unexpected size of value in verify");
+ // ASSERT(valPtr->length() == 207, "unexpected size of value in verify");
const auto& iter = valuesMap.find(key);
ASSERT(iter != valuesMap.end(), "expected to find key in map");
valPtr = std::dynamic_pointer_cast<CacheableString>(iter->second);
ASSERT(valPtr != nullptr, "expected non-null value");
- //ASSERT(valPtr->length() == 207, "unexpected size of value in verify");
+ // ASSERT(valPtr->length() == 207, "unexpected size of value in verify");
}
LOG("On client Found all int64 entries with "
"correct size via getAll.");
diff --git a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
index c2c9335..7d46c50 100644
--- a/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
+++ b/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
@@ -363,8 +363,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_REGION)
}
try {
- const auto values =
- dataReg->getAll(keys, CacheableInt32::create(1000));
+ const auto values = dataReg->getAll(keys, CacheableInt32::create(1000));
bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
->getAndResetNetworkHopFlag();
ASSERT(values.size() == 5, "number of value size should be 5");
diff --git a/cppcache/integration-test/testThinClientInterestNotify.cpp b/cppcache/integration-test/testThinClientInterestNotify.cpp
index 2a7cd66..a35a529 100644
--- a/cppcache/integration-test/testThinClientInterestNotify.cpp
+++ b/cppcache/integration-test/testThinClientInterestNotify.cpp
@@ -234,8 +234,7 @@ void registerInterests(const char* region, bool durable, bool receiveValues) {
regionPtr->registerKeys(keysVector, durable, true, receiveValues);
- regionPtr->registerRegex("key-regex.*", durable, true,
- receiveValues);
+ regionPtr->registerRegex("key-regex.*", durable, true, receiveValues);
}
void unregisterInterests(const char* region) {
diff --git a/cppcache/integration-test/testThinClientPRSingleHop.cpp b/cppcache/integration-test/testThinClientPRSingleHop.cpp
index 3ac0888..e2095e3 100644
--- a/cppcache/integration-test/testThinClientPRSingleHop.cpp
+++ b/cppcache/integration-test/testThinClientPRSingleHop.cpp
@@ -1250,11 +1250,9 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckGetAllTask)
ACE_Time_Value interval = ACE_OS::gettimeofday() - startTime;
LOGDEBUG("NILKANTH: Time taken to execute getALL sec = %d and MSec = %d ",
interval.sec(), interval.usec());
- ASSERT(valuesMap.size() == 100000,
- "GetAll returns wrong number of values");
+ ASSERT(valuesMap.size() == 100000, "GetAll returns wrong number of values");
- valuesMap =
- dataReg->getAll(keys, CacheableInt32::create(10000));
+ valuesMap = dataReg->getAll(keys, CacheableInt32::create(10000));
ASSERT(valuesMap.size() == 100000,
"GetAllWithCallBack returns wrong number of values");
diff --git a/cppcache/src/CacheableDate.cpp b/cppcache/src/CacheableDate.cpp
index 0e9635c..ca147de 100644
--- a/cppcache/src/CacheableDate.cpp
+++ b/cppcache/src/CacheableDate.cpp
@@ -40,7 +40,9 @@ void CacheableDate::toData(DataOutput& output) const {
output.writeInt(m_timevalue);
}
-void CacheableDate::fromData(DataInput& input) { m_timevalue = input.readInt64(); }
+void CacheableDate::fromData(DataInput& input) {
+ m_timevalue = input.readInt64();
+}
Serializable* CacheableDate::createDeserializable() {
return new CacheableDate();
diff --git a/cppcache/src/ClientProxyMembershipID.cpp b/cppcache/src/ClientProxyMembershipID.cpp
index aa5cc32..4b3d718 100644
--- a/cppcache/src/ClientProxyMembershipID.cpp
+++ b/cppcache/src/ClientProxyMembershipID.cpp
@@ -230,17 +230,17 @@ void ClientProxyMembershipID::fromData(DataInput& input) {
hostAddr = new uint8_t[len];
input.readBytesOnly(hostAddr, len); // inetaddress
- hostPort = input.readInt32(); // port
- hostname = input.readObject<CacheableString>(); // hostname
- splitbrain = input.read(); // splitbrain
- dcport = input.readInt32(); // port
- vPID = input.readInt32(); // pid
- vmKind = input.read(); // vmkind
+ hostPort = input.readInt32(); // port
+ hostname = input.readObject<CacheableString>(); // hostname
+ splitbrain = input.read(); // splitbrain
+ dcport = input.readInt32(); // port
+ vPID = input.readInt32(); // pid
+ vmKind = input.read(); // vmkind
auto aStringArray = CacheableStringArray::create();
aStringArray->fromData(input);
- dsName = input.readObject<CacheableString>(); // name
- uniqueTag = input.readObject<CacheableString>(); // unique tag
- durableClientId = input.readObject<CacheableString>(); // durable client id
+ dsName = input.readObject<CacheableString>(); // name
+ uniqueTag = input.readObject<CacheableString>(); // unique tag
+ durableClientId = input.readObject<CacheableString>(); // durable client id
durableClntTimeOut = input.readInt32(); // durable client timeout
int32_t vmViewId = 0;
readVersion(splitbrain, input);
@@ -379,7 +379,8 @@ void ClientProxyMembershipID::readVersion(int flags, DataInput& input) {
LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ", ordinal);
if (ordinal != ClientProxyMembershipID::TOKEN_ORDINAL) {
} else {
- LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ", input.readInt16());
+ LOGDEBUG("ClientProxyMembershipID::readVersion ordinal = %d ",
+ input.readInt16());
}
}
}
diff --git a/cppcache/src/EventId.cpp b/cppcache/src/EventId.cpp
index a14e724..bf23ffd 100644
--- a/cppcache/src/EventId.cpp
+++ b/cppcache/src/EventId.cpp
@@ -75,7 +75,7 @@ void EventId::fromData(DataInput& input) {
// TODO: statics being assigned; not thread-safe??
m_eidMemLen = input.readArrayLen();
input.readBytesOnly(reinterpret_cast<int8_t*>(m_eidMem), m_eidMemLen);
- input.readArrayLen(); // ignore arrayLen
+ input.readArrayLen(); // ignore arrayLen
m_eidThr = getEventIdData(input, input.read());
m_eidSeq = getEventIdData(input, input.read());
m_bucketId = input.readInt32();
diff --git a/cppcache/src/FarSideEntryOp.cpp b/cppcache/src/FarSideEntryOp.cpp
index 535e4d4..f991588 100644
--- a/cppcache/src/FarSideEntryOp.cpp
+++ b/cppcache/src/FarSideEntryOp.cpp
@@ -101,7 +101,7 @@ void FarSideEntryOp::fromData(DataInput& input, bool largeModCount,
}
} else {
// uint8_t* buf = nullptr;
- input.readArrayLen(); // ignore len
+ input.readArrayLen(); // ignore len
input.readObject(m_value);
// input.readBytes(&buf, &len);
@@ -132,7 +132,7 @@ void FarSideEntryOp::skipFilterRoutingInfo(DataInput& input) {
if (structType == GeodeTypeIds::NullObj) {
return;
} else if (structType == GeodeTypeIdsImpl::DataSerializable) {
- input.read(); // ignore classbyte
+ input.read(); // ignore classbyte
input.readObject(tmp);
int32_t size = input.readInt32();
for (int i = 0; i < size; i++) {
diff --git a/cppcache/src/FunctionService.cpp b/cppcache/src/FunctionService.cpp
index c6d3c25..f20f0d7 100644
--- a/cppcache/src/FunctionService.cpp
+++ b/cppcache/src/FunctionService.cpp
@@ -57,7 +57,7 @@ ExecutionPtr FunctionService::onRegion(const RegionPtr& region) {
// getting real region to execute function on region
if (!realRegion->getCache()->isClosed()) {
realRegion->getCache()->m_cacheImpl->getRegion(realRegion->getName(),
- realRegion);
+ realRegion);
} else {
throw IllegalStateException("Cache has been closed");
}
diff --git a/cppcache/src/LocalRegion.cpp b/cppcache/src/LocalRegion.cpp
index df17a6d..c618b3b 100644
--- a/cppcache/src/LocalRegion.cpp
+++ b/cppcache/src/LocalRegion.cpp
@@ -538,7 +538,6 @@ HashMapOfCacheable LocalRegion::getAll(
HashMapOfCacheable LocalRegion::getAll_internal(
const VectorOfCacheableKey& keys, const SerializablePtr& aCallbackArgument,
bool addToLocalCache) {
-
if (keys.empty()) {
throw IllegalArgumentException("Region::getAll: zero keys provided");
}
@@ -787,7 +786,7 @@ VectorOfRegion LocalRegion::subregions_internal(const bool recursive) {
// decend...
for (int32_t i = 0; i < subRegions.size(); i++) {
auto temp = dynamic_cast<LocalRegion*>(subRegions.at(i).get())
- ->subregions_internal(true);
+ ->subregions_internal(true);
regions.insert(regions.end(), temp.begin(), temp.end());
}
}
@@ -1161,7 +1160,7 @@ class CreateActions {
const CacheablePtr& value,
const SerializablePtr& aCallbackArgument,
VersionTagPtr& versionTag) {
- return m_region.createNoThrow_remote(key, value, aCallbackArgument,
+ return m_region.createNoThrow_remote(key, value, aCallbackArgument,
versionTag);
}
diff --git a/cppcache/src/LocalRegion.hpp b/cppcache/src/LocalRegion.hpp
index a120955..7fb0fe1 100644
--- a/cppcache/src/LocalRegion.hpp
+++ b/cppcache/src/LocalRegion.hpp
@@ -191,13 +191,12 @@ class CPPCACHE_EXPORT LocalRegion : public RegionInternal {
VectorOfCacheable values();
VectorOfRegionEntry entries(bool recursive);
- HashMapOfCacheable getAll(
- const VectorOfCacheableKey& keys,
- const SerializablePtr& aCallbackArgument = nullptr);
+ HashMapOfCacheable getAll(const VectorOfCacheableKey& keys,
+ const SerializablePtr& aCallbackArgument = nullptr);
- HashMapOfCacheable getAll_internal(
- const VectorOfCacheableKey& keys,
- const SerializablePtr& aCallbackArgument, bool addToLocalCache);
+ HashMapOfCacheable getAll_internal(const VectorOfCacheableKey& keys,
+ const SerializablePtr& aCallbackArgument,
+ bool addToLocalCache);
void putAll(const HashMapOfCacheable& map,
uint32_t timeout = DEFAULT_RESPONSE_TIMEOUT,
diff --git a/cppcache/src/PdxFieldType.cpp b/cppcache/src/PdxFieldType.cpp
index ae4514d..767f1af 100644
--- a/cppcache/src/PdxFieldType.cpp
+++ b/cppcache/src/PdxFieldType.cpp
@@ -79,7 +79,7 @@ void PdxFieldType::toData(DataOutput& output) const {
}
void PdxFieldType::fromData(DataInput& input) {
- input.read(); // ignore typeid
+ input.read(); // ignore typeid
char* fname = nullptr;
input.readUTF(&fname);
m_fieldName = fname;
diff --git a/cppcache/src/PdxInstanceFactoryImpl.cpp b/cppcache/src/PdxInstanceFactoryImpl.cpp
index a3bffc1..2c8aa04 100644
--- a/cppcache/src/PdxInstanceFactoryImpl.cpp
+++ b/cppcache/src/PdxInstanceFactoryImpl.cpp
@@ -54,8 +54,8 @@ std::unique_ptr<PdxInstance> PdxInstanceFactoryImpl::create() {
return pi;
}
-PdxInstanceFactoryPtr PdxInstanceFactoryImpl::writeChar(
- const char* fieldName, char16_t value) {
+PdxInstanceFactoryPtr PdxInstanceFactoryImpl::writeChar(const char* fieldName,
+ char16_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
PdxTypes::CHAR_SIZE);
diff --git a/cppcache/src/PdxInstanceFactoryImpl.hpp b/cppcache/src/PdxInstanceFactoryImpl.hpp
index cecf043..368562d 100644
--- a/cppcache/src/PdxInstanceFactoryImpl.hpp
+++ b/cppcache/src/PdxInstanceFactoryImpl.hpp
@@ -73,7 +73,7 @@ class CPPCACHE_EXPORT PdxInstanceFactoryImpl
* or fieldName is nullptr or empty.
*/
virtual PdxInstanceFactoryPtr writeChar(const char* fieldName,
- char16_t value);
+ char16_t value);
/**
* Writes the named field with the given value to the serialized form.
diff --git a/cppcache/src/PdxInstanceImpl.cpp b/cppcache/src/PdxInstanceImpl.cpp
index 8f32b2a..7c6a19e 100644
--- a/cppcache/src/PdxInstanceImpl.cpp
+++ b/cppcache/src/PdxInstanceImpl.cpp
@@ -283,8 +283,7 @@ void PdxInstanceImpl::writeField(PdxWriterPtr writer, const char* fieldName,
break;
}
case PdxFieldTypes::OBJECT_ARRAY: {
- auto objArray =
- std::dynamic_pointer_cast<CacheableObjectArray>(value);
+ auto objArray = std::dynamic_pointer_cast<CacheableObjectArray>(value);
if (objArray != nullptr) {
writer->writeObjectArray(fieldName, objArray);
}
@@ -801,7 +800,7 @@ bool PdxInstanceImpl::hasField(const char* fieldname) {
return (pft != nullptr);
}
-bool PdxInstanceImpl::getBooleanField(const char *fieldname) const {
+bool PdxInstanceImpl::getBooleanField(const char* fieldname) const {
auto dataInput = getDataInputForField(fieldname);
return dataInput->readBoolean();
}
@@ -811,7 +810,7 @@ int8_t PdxInstanceImpl::getByteField(const char* fieldname) const {
return dataInput->read();
}
-int16_t PdxInstanceImpl::getShortField(const char *fieldname) const {
+int16_t PdxInstanceImpl::getShortField(const char* fieldname) const {
auto dataInput = getDataInputForField(fieldname);
return dataInput->readInt16();
}
@@ -932,14 +931,14 @@ void PdxInstanceImpl::getField(const char* fieldname, char*** value,
}
CacheableDatePtr PdxInstanceImpl::getCacheableDateField(
- const char* fieldname) const {
+ const char* fieldname) const {
auto dataInput = getDataInputForField(fieldname);
auto value = CacheableDate::create();
value->fromData(*dataInput);
return value;
}
-CacheablePtr PdxInstanceImpl::getCacheableField(const char *fieldname) const {
+CacheablePtr PdxInstanceImpl::getCacheableField(const char* fieldname) const {
auto dataInput = getDataInputForField(fieldname);
CacheablePtr value;
dataInput->readObject(value);
@@ -947,7 +946,7 @@ CacheablePtr PdxInstanceImpl::getCacheableField(const char *fieldname) const {
}
CacheableObjectArrayPtr PdxInstanceImpl::getCacheableObjectArrayField(
- const char* fieldname) const {
+ const char* fieldname) const {
auto dataInput = getDataInputForField(fieldname);
auto value = CacheableObjectArray::create();
value->fromData(*dataInput);
@@ -1030,7 +1029,7 @@ CacheableStringPtr PdxInstanceImpl::toString() const {
break;
}
case PdxFieldTypes::DOUBLE: {
- double value = getDoubleField(identityFields.at(i)->getFieldName());
+ double value = getDoubleField(identityFields.at(i)->getFieldName());
ACE_OS::snprintf(buf, 2048, "%f", value);
toString += buf;
break;
@@ -1150,8 +1149,8 @@ CacheableStringPtr PdxInstanceImpl::toString() const {
break;
}
case PdxFieldTypes::DATE: {
- CacheableDatePtr value = getCacheableDateField(
- identityFields.at(i)->getFieldName());
+ CacheableDatePtr value =
+ getCacheableDateField(identityFields.at(i)->getFieldName());
if (value != nullptr) {
ACE_OS::snprintf(buf, 2048, "%s", value->toString()->asChar());
toString += buf;
@@ -1188,8 +1187,8 @@ CacheableStringPtr PdxInstanceImpl::toString() const {
break;
}
case PdxFieldTypes::OBJECT_ARRAY: {
- CacheableObjectArrayPtr value = getCacheableObjectArrayField(
- identityFields.at(i)->getFieldName());
+ CacheableObjectArrayPtr value =
+ getCacheableObjectArrayField(identityFields.at(i)->getFieldName());
if (value != nullptr) {
ACE_OS::snprintf(buf, 2048, "%s\t", value->toString()->asChar());
toString += buf;
@@ -1197,7 +1196,8 @@ CacheableStringPtr PdxInstanceImpl::toString() const {
break;
}
default: {
- CacheablePtr value = getCacheableField(identityFields.at(i)->getFieldName());
+ CacheablePtr value =
+ getCacheableField(identityFields.at(i)->getFieldName());
if (value != nullptr) {
ACE_OS::snprintf(buf, 2048, "%s\t", value->toString()->asChar());
toString += buf;
diff --git a/cppcache/src/PdxInstanceImpl.hpp b/cppcache/src/PdxInstanceImpl.hpp
index 19a366f..049e96f 100644
--- a/cppcache/src/PdxInstanceImpl.hpp
+++ b/cppcache/src/PdxInstanceImpl.hpp
@@ -74,7 +74,7 @@ class CPPCACHE_EXPORT PdxInstanceImpl : public WritablePdxInstance {
*
* @see PdxInstance#hasField
*/
- virtual bool getBooleanField(const char *fieldname) const;
+ virtual bool getBooleanField(const char* fieldname) const;
/**
* Reads the named field and set its value in signed char type out param.
@@ -100,7 +100,7 @@ class CPPCACHE_EXPORT PdxInstanceImpl : public WritablePdxInstance {
*
* @see PdxInstance#hasField
*/
- virtual int16_t getShortField(const char *fieldname) const;
+ virtual int16_t getShortField(const char* fieldname) const;
/**
* Reads the named field and set its value in int32_t type out param.
@@ -382,7 +382,7 @@ class CPPCACHE_EXPORT PdxInstanceImpl : public WritablePdxInstance {
* @see serializationRegistry->addPdxType
* @see PdxInstance#hasField
*/
- virtual CacheablePtr getCacheableField(const char *fieldname) const;
+ virtual CacheablePtr getCacheableField(const char* fieldname) const;
/**
* Reads the named field and set its value in CacheableObjectArrayPtr type out
@@ -399,7 +399,7 @@ class CPPCACHE_EXPORT PdxInstanceImpl : public WritablePdxInstance {
* @see PdxInstance#hasField
*/
virtual CacheableObjectArrayPtr getCacheableObjectArrayField(
- const char* fieldname) const;
+ const char* fieldname) const;
/**
* Set the existing named field to the given value.
diff --git a/cppcache/src/PdxLocalWriter.cpp b/cppcache/src/PdxLocalWriter.cpp
index 53d84cf..0c81f12 100644
--- a/cppcache/src/PdxLocalWriter.cpp
+++ b/cppcache/src/PdxLocalWriter.cpp
@@ -164,8 +164,7 @@ PdxWriterPtr PdxLocalWriter::writeChar(const char* fieldName, char value) {
return shared_from_this();
}
-PdxWriterPtr PdxLocalWriter::writeChar(const char* fieldName,
- char16_t value) {
+PdxWriterPtr PdxLocalWriter::writeChar(const char* fieldName, char16_t value) {
m_dataOutput->writeChar(value);
return shared_from_this();
}
diff --git a/cppcache/src/PdxType.cpp b/cppcache/src/PdxType.cpp
index ff32d42..b67a18a 100644
--- a/cppcache/src/PdxType.cpp
+++ b/cppcache/src/PdxType.cpp
@@ -90,14 +90,14 @@ void PdxType::toData(DataOutput& output) const {
}
void PdxType::fromData(DataInput& input) {
- input.read(); // ignore dsByte
+ input.read(); // ignore dsByte
- input.read(); // ignore classByte
+ input.read(); // ignore classByte
- input.read(); // ignore classtypeId
+ input.read(); // ignore classtypeId
input.readUTF(const_cast<char**>(&m_javaPdxClass));
- input.read(); // ignore int8_t classtypeId;2
+ input.read(); // ignore int8_t classtypeId;2
input.readUTF(&m_className);
m_noJavaClass = input.readBoolean();
diff --git a/cppcache/src/ProxyRegion.hpp b/cppcache/src/ProxyRegion.hpp
index 54efee5..5501aa2 100644
--- a/cppcache/src/ProxyRegion.hpp
+++ b/cppcache/src/ProxyRegion.hpp
@@ -1494,7 +1494,8 @@ class CPPCACHE_EXPORT ProxyRegion : public Region {
virtual const PoolPtr& getPool() { return m_realRegion->getPool(); }
- ProxyRegion(const ProxyCachePtr& proxyCache, const std::shared_ptr<RegionInternal>& realRegion)
+ ProxyRegion(const ProxyCachePtr& proxyCache,
+ const std::shared_ptr<RegionInternal>& realRegion)
: Region(realRegion->getCache()) {
m_proxyCache = proxyCache;
m_realRegion = realRegion;
diff --git a/cppcache/src/RegionAttributes.cpp b/cppcache/src/RegionAttributes.cpp
index d9819d4..26e9184 100644
--- a/cppcache/src/RegionAttributes.cpp
+++ b/cppcache/src/RegionAttributes.cpp
@@ -446,9 +446,7 @@ void writeBool(DataOutput& out, bool field) {
out.write(static_cast<int8_t>(field ? 1 : 0));
}
-void readBool(DataInput& in, bool* field) {
- *field = in.read() ? true : false;
-}
+void readBool(DataInput& in, bool* field) { *field = in.read() ? true : false; }
void writeCharStar(DataOutput& out, const char* field) {
if (field == nullptr) {
@@ -512,13 +510,17 @@ void RegionAttributes::toData(DataOutput& out) const {
void RegionAttributes::fromData(DataInput& in) {
m_regionTimeToLive = in.readInt32();
- m_regionTimeToLiveExpirationAction = static_cast<ExpirationAction::Action>(in.readInt32());
+ m_regionTimeToLiveExpirationAction =
+ static_cast<ExpirationAction::Action>(in.readInt32());
m_regionIdleTimeout = in.readInt32();
- m_regionIdleTimeoutExpirationAction = static_cast<ExpirationAction::Action>(in.readInt32());
+ m_regionIdleTimeoutExpirationAction =
+ static_cast<ExpirationAction::Action>(in.readInt32());
m_entryTimeToLive = in.readInt32();
- m_entryTimeToLiveExpirationAction = static_cast<ExpirationAction::Action>(in.readInt32());
+ m_entryTimeToLiveExpirationAction =
+ static_cast<ExpirationAction::Action>(in.readInt32());
m_entryIdleTimeout = in.readInt32();
- m_entryIdleTimeoutExpirationAction = static_cast<ExpirationAction::Action>(in.readInt32());
+ m_entryIdleTimeoutExpirationAction =
+ static_cast<ExpirationAction::Action>(in.readInt32());
m_initialCapacity = in.readInt32();
m_loadFactor = in.readFloat();
m_maxValueDistLimit = in.readInt32();
diff --git a/cppcache/src/RegionEntry.cpp b/cppcache/src/RegionEntry.cpp
index 55b8248..430e8fb 100644
--- a/cppcache/src/RegionEntry.cpp
+++ b/cppcache/src/RegionEntry.cpp
@@ -37,9 +37,7 @@ CacheablePtr RegionEntry::getValue() {
RegionPtr RegionEntry::getRegion() { return m_region; }
-CacheStatisticsPtr RegionEntry::getStatistics() {
- return m_statistics;
-}
+CacheStatisticsPtr RegionEntry::getStatistics() { return m_statistics; }
bool RegionEntry::isDestroyed() const { return m_destroyed; }
diff --git a/cppcache/src/RemoteQueryService.cpp b/cppcache/src/RemoteQueryService.cpp
index 2a7422f..67e37f8 100644
--- a/cppcache/src/RemoteQueryService.cpp
+++ b/cppcache/src/RemoteQueryService.cpp
@@ -190,7 +190,7 @@ void RemoteQueryService::closeCqs() {
CqService::query_container_type RemoteQueryService::getCqs() {
TryReadGuard guard(m_rwLock, m_invalid);
- CqService::query_container_type vec;
+ CqService::query_container_type vec;
if (m_invalid) {
throw CacheClosedException("QueryService::getCqs: Cache has been closed.");
}
diff --git a/cppcache/src/Struct.cpp b/cppcache/src/Struct.cpp
index 194f585..ecc9429 100644
--- a/cppcache/src/Struct.cpp
+++ b/cppcache/src/Struct.cpp
@@ -37,7 +37,7 @@ Struct::Struct(StructSet* ssPtr, std::vector<SerializablePtr>& fieldValues) {
void Struct::skipClassName(DataInput& input) {
if (input.read() == GeodeTypeIdsImpl::Class) {
input.read(); // ignore string type id - assuming its a normal
- // (under 64k) string.
+ // (under 64k) string.
uint16_t len = input.readInt16();
input.advanceCursor(len);
} else {
@@ -61,7 +61,7 @@ int32_t Struct::length() const {
}
void Struct::fromData(DataInput& input) {
- input.advanceCursor(2); // ignore classType
+ input.advanceCursor(2); // ignore classType
skipClassName(input);
int32_t numOfFields = input.readArrayLen();
@@ -74,7 +74,7 @@ void Struct::fromData(DataInput& input) {
int32_t lengthForTypes = input.readArrayLen();
skipClassName(input);
for (int i = 0; i < lengthForTypes; i++) {
- input.advanceCursor(2); // ignore classType
+ input.advanceCursor(2); // ignore classType
skipClassName(input);
}
int32_t numOfSerializedValues = input.readArrayLen();
diff --git a/cppcache/src/TXCommitMessage.cpp b/cppcache/src/TXCommitMessage.cpp
index c872aff..55f7b30 100644
--- a/cppcache/src/TXCommitMessage.cpp
+++ b/cppcache/src/TXCommitMessage.cpp
@@ -73,10 +73,10 @@ m_processorId = -1;
m_farsideBaseMembershipId = nullptr;
}
- input.readInt64(); // ignore tid
- input.readInt64(); // ignore seqId
+ input.readInt64(); // ignore tid
+ input.readInt64(); // ignore seqId
- input.readBoolean(); // ignore needsLargeModCount
+ input.readBoolean(); // ignore needsLargeModCount
int32_t regionSize = input.readInt32();
for (int32_t i = 0; i < regionSize; i++) {
diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp
index a6503fd..3f2ad54 100644
--- a/cppcache/src/TcrConnection.cpp
+++ b/cppcache/src/TcrConnection.cpp
@@ -433,14 +433,16 @@ bool TcrConnection::InitTcrConnection(
if (static_cast<int8_t>((*arrayLenHeader)[0]) == -2) {
CacheableBytesPtr recvMsgLenBytes =
readHandshakeData(2, connectTimeout);
- auto dI2 = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
- recvMsgLenBytes->value(), recvMsgLenBytes->length());
+ auto dI2 =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ recvMsgLenBytes->value(), recvMsgLenBytes->length());
recvMsgLen = dI2->readInt16();
} else if (static_cast<int8_t>((*arrayLenHeader)[0]) == -3) {
CacheableBytesPtr recvMsgLenBytes =
readHandshakeData(4, connectTimeout);
- auto dI2 = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
- recvMsgLenBytes->value(), recvMsgLenBytes->length());
+ auto dI2 =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ recvMsgLenBytes->value(), recvMsgLenBytes->length());
recvMsgLen = dI2->readInt32();
}
auto recvMessage = readHandshakeData(recvMsgLen, connectTimeout);
@@ -459,15 +461,16 @@ bool TcrConnection::InitTcrConnection(
CacheableBytesPtr recvMsgLenBytes = readHandshakeData(2, connectTimeout);
auto dI3 = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
- recvMsgLenBytes->value(), recvMsgLenBytes->length());
+ recvMsgLenBytes->value(), recvMsgLenBytes->length());
uint16_t recvMsgLen2 = dI3->readInt16();
CacheableBytesPtr recvMessage =
readHandshakeData(recvMsgLen2, connectTimeout);
if (!isClientNotification) {
CacheableBytesPtr deltaEnabledMsg = readHandshakeData(1, connectTimeout);
- auto di = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
- deltaEnabledMsg->value(), 1);
+ auto di =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ deltaEnabledMsg->value(), 1);
ThinClientBaseDM::setDeltaEnabledOnServer(di->readBoolean());
}
@@ -1284,8 +1287,9 @@ CacheableBytesPtr TcrConnection::readHandshakeByteArray(
// read a byte array
uint32_t TcrConnection::readHandshakeArraySize(uint32_t connectTimeout) {
CacheableBytesPtr codeBytes = readHandshakeData(1, connectTimeout);
- auto codeDI = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
- codeBytes->value(), codeBytes->length());
+ auto codeDI =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ codeBytes->value(), codeBytes->length());
uint8_t code = codeDI->read();
uint32_t arraySize = 0;
if (code == 0xFF) {
@@ -1295,12 +1299,16 @@ uint32_t TcrConnection::readHandshakeArraySize(uint32_t connectTimeout) {
if (tempLen > 252) { // 252 is java's ((byte)-4 && 0xFF)
if (code == 0xFE) {
CacheableBytesPtr lenBytes = readHandshakeData(2, connectTimeout);
- auto lenDI = m_connectionManager->getCacheImpl()->getCache()->createDataInput(lenBytes->value(), lenBytes->length());
+ auto lenDI =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ lenBytes->value(), lenBytes->length());
uint16_t val = lenDI->readInt16();
tempLen = val;
} else if (code == 0xFD) {
CacheableBytesPtr lenBytes = readHandshakeData(4, connectTimeout);
- auto lenDI = m_connectionManager->getCacheImpl()->getCache()->createDataInput(lenBytes->value(), lenBytes->length());
+ auto lenDI =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ lenBytes->value(), lenBytes->length());
uint32_t val = lenDI->readInt32();
tempLen = val;
} else {
@@ -1390,7 +1398,8 @@ int32_t TcrConnection::readHandShakeInt(uint32_t connectTimeout) {
}
}
- auto di = m_connectionManager->getCacheImpl()->getCache()->createDataInput(recvMessage, 4);
+ auto di = m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ recvMessage, 4);
int32_t val = di->readInt32();
GF_SAFE_DELETE_ARRAY(recvMessage);
@@ -1426,7 +1435,9 @@ CacheableStringPtr TcrConnection::readHandshakeString(uint32_t connectTimeout) {
}
case GF_STRING: {
CacheableBytesPtr lenBytes = readHandshakeData(2, connectTimeout);
- auto lenDI = m_connectionManager->getCacheImpl()->getCache()->createDataInput(lenBytes->value(), lenBytes->length());
+ auto lenDI =
+ m_connectionManager->getCacheImpl()->getCache()->createDataInput(
+ lenBytes->value(), lenBytes->length());
length = lenDI->readInt16();
break;
diff --git a/cppcache/src/TcrMessage.cpp b/cppcache/src/TcrMessage.cpp
index cd3413a..066ddf7 100644
--- a/cppcache/src/TcrMessage.cpp
+++ b/cppcache/src/TcrMessage.cpp
@@ -110,15 +110,15 @@ void TcrMessage::readBooleanPartAsObject(DataInput& input, bool* boolVal) {
void TcrMessage::readOldValue(DataInput& input) {
int32_t lenObj = input.readInt32();
- input.read(); //ignore isObj
+ input.read(); // ignore isObj
CacheablePtr value;
input.readObject(value); // we are not using this value currently
}
void TcrMessage::readPrMetaData(DataInput& input) {
int32_t lenObj = input.readInt32();
- input.read(); // ignore
- m_metaDataVersion = input.read();// read refresh meta data byte
+ input.read(); // ignore
+ m_metaDataVersion = input.read(); // read refresh meta data byte
if (lenObj == 2) {
m_serverGroupVersion = input.read();
LOGDEBUG("Single-hop m_serverGroupVersion in message reply is %d",
@@ -129,7 +129,7 @@ void TcrMessage::readPrMetaData(DataInput& input) {
VersionTagPtr TcrMessage::readVersionTagPart(
DataInput& input, uint16_t endpointMemId,
MemberListForVersionStamp& memberListForVersionStamp) {
- auto isObj= input.read();
+ auto isObj = input.read();
VersionTagPtr versionTag;
if (isObj == GeodeTypeIds::NullObj) return versionTag;
@@ -156,7 +156,7 @@ void TcrMessage::readVersionTag(
DataInput& input, uint16_t endpointMemId,
MemberListForVersionStamp& memberListForVersionStamp) {
int32_t lenObj = input.readInt32();
- input.read(); // ignore byte
+ input.read(); // ignore byte
if (lenObj == 0) return;
auto versionTag = TcrMessage::readVersionTagPart(input, endpointMemId,
@@ -347,7 +347,7 @@ inline void TcrMessage::readFailedNodePart(DataInput& input,
int32_t lenObj = input.readInt32();
const auto isObj = input.readBoolean();
m_failedNode = CacheableHashSet::create();
- input.read(); // ignore typeId
+ input.read(); // ignore typeId
// input.readDirectObject(m_failedNode, typeId);
m_failedNode->fromData(input);
LOGDEBUG("readFailedNodePart m_failedNode size = %d ", m_failedNode->size());
@@ -389,32 +389,28 @@ SerializablePtr TcrMessage::readCacheableString(DataInput& input, int lenObj) {
input.rewindCursor(2);
writeInt(const_cast<uint8_t*>(input.currentBufferPosition()),
static_cast<uint16_t>(lenObj));
- sPtr = input.readDirectObject(
- static_cast<int8_t>(
- apache::geode::client::GeodeTypeIds::CacheableASCIIString));
+ sPtr = input.readDirectObject(static_cast<int8_t>(
+ apache::geode::client::GeodeTypeIds::CacheableASCIIString));
} else {
input.rewindCursor(4);
writeInt(const_cast<uint8_t*>(input.currentBufferPosition()),
static_cast<uint32_t>(lenObj));
- sPtr = input.readDirectObject(
- static_cast<int8_t>(
- apache::geode::client::GeodeTypeIds::CacheableASCIIStringHuge));
+ sPtr = input.readDirectObject(static_cast<int8_t>(
+ apache::geode::client::GeodeTypeIds::CacheableASCIIStringHuge));
}
} else {
if (decodedLen <= 0xffff) {
input.rewindCursor(2);
writeInt(const_cast<uint8_t*>(input.currentBufferPosition()),
static_cast<uint16_t>(lenObj));
- sPtr = input.readDirectObject(
- static_cast<int8_t>(
- apache::geode::client::GeodeTypeIds::CacheableString));
+ sPtr = input.readDirectObject(static_cast<int8_t>(
+ apache::geode::client::GeodeTypeIds::CacheableString));
} else {
input.rewindCursor(4);
writeInt(const_cast<uint8_t*>(input.currentBufferPosition()),
static_cast<uint32_t>(lenObj));
- sPtr = input.readDirectObject(
- static_cast<int8_t>(
- apache::geode::client::GeodeTypeIds::CacheableStringHuge));
+ sPtr = input.readDirectObject(static_cast<int8_t>(
+ apache::geode::client::GeodeTypeIds::CacheableStringHuge));
}
}
@@ -978,7 +974,7 @@ void TcrMessage::handleByteArrayResponse(
m_value = serializationRegistry.deserialize(*input);
} else if (m_msgTypeRequest == TcrMessage::GET_FUNCTION_ATTRIBUTES) {
int32_t lenObj = input->readInt32();
- input->advanceCursor(1); // ignore byte
+ input->advanceCursor(1); // ignore byte
m_functionAttributes = new std::vector<int8_t>();
m_functionAttributes->push_back(input->read());
@@ -1130,7 +1126,7 @@ void TcrMessage::handleByteArrayResponse(
case TcrMessage::LOCAL_INVALIDATE:
case TcrMessage::LOCAL_DESTROY: {
int32_t regionLen = input->readInt32();
- input->advanceCursor(1); // ignore byte
+ input->advanceCursor(1); // ignore byte
char* regname = nullptr;
regname = new char[regionLen + 1];
DeleteArray<char> delRegName(regname);
@@ -1165,7 +1161,7 @@ void TcrMessage::handleByteArrayResponse(
case TcrMessage::LOCAL_CREATE:
case TcrMessage::LOCAL_UPDATE: {
int32_t regionLen = input->readInt32();
- input->advanceCursor(1); // ignore byte
+ input->advanceCursor(1); // ignore byte
char* regname = nullptr;
regname = new char[regionLen + 1];
DeleteArray<char> delRegName(regname);
@@ -1180,7 +1176,7 @@ void TcrMessage::handleByteArrayResponse(
if (isDelta) {
m_deltaBytesLen = input->readInt32();
- input->advanceCursor(1); // ignore byte
+ input->advanceCursor(1); // ignore byte
m_deltaBytes = new uint8_t[m_deltaBytesLen];
input->readBytesOnly(m_deltaBytes, m_deltaBytesLen);
m_delta = m_tcdm->getConnectionManager().getCacheImpl()->getCache()->createDataInput(
@@ -1217,7 +1213,7 @@ void TcrMessage::handleByteArrayResponse(
case TcrMessage::LOCAL_DESTROY_REGION:
case TcrMessage::CLEAR_REGION: {
int32_t regionLen = input->readInt32();
- input->advanceCursor(1); // ignore byte
+ input->advanceCursor(1); // ignore byte
char* regname = nullptr;
regname = new char[regionLen + 1];
DeleteArray<char> delRegName(regname);
@@ -1245,8 +1241,8 @@ void TcrMessage::handleByteArrayResponse(
m_metadata = new std::vector<std::vector<BucketServerLocationPtr> >();
for (int32_t i = 0; i < numparts; i++) {
int32_t bits32 = input->readInt32(); // partlen;
- input->read(); // isObj;
- auto bits8 = input->read(); // cacheable vector typeid
+ input->read(); // isObj;
+ auto bits8 = input->read(); // cacheable vector typeid
LOGDEBUG("Expected typeID %d, got %d", GeodeTypeIds::CacheableArrayList,
bits8);
@@ -1281,32 +1277,34 @@ void TcrMessage::handleByteArrayResponse(
case TcrMessage::RESPONSE_CLIENT_PARTITION_ATTRIBUTES: {
int32_t bits32 = input->readInt32(); // partlen;
- input->read(); //ignore isObj;
+ input->read(); // ignore isObj;
m_bucketCount = input->readNativeInt32(); // PART1 = bucketCount
bits32 = input->readInt32(); // partlen;
- input->read(); //ignore isObj;
+ input->read(); // ignore isObj;
if (bits32 > 0) {
m_colocatedWith = input->readNativeString(); // PART2 = colocatedwith
}
if (numparts == 4) {
bits32 = input->readInt32(); // partlen;
- input->read(); //ignore isObj;
+ input->read(); // ignore isObj;
if (bits32 > 0) {
- m_partitionResolverName = input->readNativeString(); // PART3 = partitionresolvername
+ m_partitionResolverName =
+ input->readNativeString(); // PART3 = partitionresolvername
}
bits32 = input->readInt32(); // partlen;
- input->read(); // ignore isObj;
- input->read(); // ignore cacheable CacheableHashSet typeid
+ input->read(); // ignore isObj;
+ input->read(); // ignore cacheable CacheableHashSet typeid
bits32 = input->readArrayLen(); // array length
if (bits32 > 0) {
m_fpaSet = new std::vector<FixedPartitionAttributesImplPtr>();
for (int32_t index = 0; index < bits32; index++) {
- input->advanceCursor(3); // ignore DS typeid, CLASS typeid, string typeid
+ input->advanceCursor(
+ 3); // ignore DS typeid, CLASS typeid, string typeid
uint16_t classLen = input->readInt16(); // Read classLen
input->advanceCursor(classLen);
auto fpa = std::make_shared<FixedPartitionAttributesImpl>();
diff --git a/cppcache/src/TcrMessage.hpp b/cppcache/src/TcrMessage.hpp
index 83b015f..8095356 100644
--- a/cppcache/src/TcrMessage.hpp
+++ b/cppcache/src/TcrMessage.hpp
@@ -1301,7 +1301,8 @@ class TcrMessageHelper {
}
// This is for GETALL
if (expectedFirstType == GeodeTypeIdsImpl::FixedIDShort) {
- compId = input.readInt16();;
+ compId = input.readInt16();
+ ;
} // This is for QUERY or REGISTER INTEREST.
else if (expectedFirstType == GeodeTypeIdsImpl::FixedIDByte ||
expectedFirstType == 0) {
diff --git a/cppcache/src/ThinClientRegion.cpp b/cppcache/src/ThinClientRegion.cpp
index 3edbc9b..fe068fe 100644
--- a/cppcache/src/ThinClientRegion.cpp
+++ b/cppcache/src/ThinClientRegion.cpp
@@ -549,7 +549,8 @@ void ThinClientRegion::registerRegex(const char* regex, bool isDurable,
LOGDEBUG("ThinClientRegion::registerRegex : interestpolicy is %d",
interestPolicy.ordinal);
- VectorOfCacheableKeyPtr resultKeys2 = std::make_shared<VectorOfCacheableKey>();
+ VectorOfCacheableKeyPtr resultKeys2 =
+ std::make_shared<VectorOfCacheableKey>();
// if we need to fetch initial data for "allKeys" case, then we
// get the keys in that call itself using the special GET_ALL message and
@@ -2481,7 +2482,6 @@ GfErrType ThinClientRegion::registerRegexNoThrow(
reply = &replyLocal;
if (interestPolicy.ordinal == InterestResultPolicy::KEYS_VALUES.ordinal) {
-
MapOfUpdateCounters trackers;
int32_t destroyTracker = 1;
if (resultKeys == nullptr) {
@@ -2502,7 +2502,7 @@ GfErrType ThinClientRegion::registerRegexNoThrow(
}
err = m_tcrdm->sendSyncRequestRegisterInterest(
request, replyLocal, attemptFailover, this, endpoint);
- } else{
+ } else {
err = m_tcrdm->sendSyncRequestRegisterInterest(
request, *reply, attemptFailover, this, endpoint);
}
@@ -2622,7 +2622,7 @@ void ThinClientRegion::addKeys(const VectorOfCacheableKey& keys, bool isDurable,
}
}
-void ThinClientRegion:: addRegex(const std::string& regex, bool isDurable,
+void ThinClientRegion::addRegex(const std::string& regex, bool isDurable,
bool receiveValues,
InterestResultPolicy interestpolicy) {
std::unordered_map<CacheableKeyPtr, InterestResultPolicy>& interestList =
@@ -3417,7 +3417,6 @@ void ChunkedQueryResponse::reset() {
void ChunkedQueryResponse::readObjectPartList(DataInput& input,
bool isResultSet) {
-
if (input.readBoolean()) {
LOGERROR("Query response has keys which is unexpected.");
throw IllegalStateException("Query response has keys which is unexpected.");
@@ -3426,9 +3425,8 @@ void ChunkedQueryResponse::readObjectPartList(DataInput& input,
int32_t len = input.readInt32();
for (int32_t index = 0; index < len; ++index) {
-
if (input.read() == 2 /* for exception*/) {
- input.advanceCursor(input.readArrayLen()); // skipLen
+ input.advanceCursor(input.readArrayLen()); // skipLen
CacheableStringPtr exMsgPtr = input.readNativeString();
throw IllegalStateException(exMsgPtr->asChar());
} else {
@@ -3494,7 +3492,6 @@ void ChunkedQueryResponse::handleChunk(const uint8_t* chunk, int32_t chunkLen,
return;
}
-
char* isStructTypeImpl = nullptr;
uint16_t stiLen = 0;
// soubhik: ignoring parent classes for now
@@ -3512,7 +3509,8 @@ void ChunkedQueryResponse::handleChunk(const uint8_t* chunk, int32_t chunkLen,
input->read(); // this is Fixed ID byte (1)
input->read(); // this is DataSerializable (45)
uint8_t classByte = input->read();
- uint8_t stringType = input->read(); // ignore string header - assume 64k string
+ uint8_t stringType =
+ input->read(); // ignore string header - assume 64k string
input->readUTF(&isStructTypeImpl, &stiLen);
DeleteArray<char> delSTI(isStructTypeImpl);
@@ -3680,7 +3678,7 @@ void ChunkedFunctionExecutionResponse::handleChunk(
partLen = input->readInt32();
// then isObject byte
- input->read(); // ignore iSobject
+ input->read(); // ignore iSobject
startLen = input->getBytesRead(); // reset from here need to look value
// part + memberid AND -1 for array type
@@ -3944,8 +3942,9 @@ void ChunkedDurableCQListResponse::handleChunk(const uint8_t* chunk,
input->advanceCursor(1); // skip the CacheableArrayList type ID byte
- const auto stringParts = input->read(); // read the number of strings in the message this
- // is one byte
+ const auto stringParts =
+ input->read(); // read the number of strings in the message this
+ // is one byte
for (int i = 0; i < stringParts; i++) {
m_resultList->push_back(input->readObject<CacheableString>());
diff --git a/cppcache/src/VersionTag.cpp b/cppcache/src/VersionTag.cpp
index 283e4b9..cee7f3b 100644
--- a/cppcache/src/VersionTag.cpp
+++ b/cppcache/src/VersionTag.cpp
@@ -53,7 +53,7 @@ void VersionTag::toData(DataOutput& output) const {
void VersionTag::fromData(DataInput& input) {
uint16_t flags = input.readInt16();
m_bits = input.readInt16();
- input.read(); //skip distributedSystemId
+ input.read(); // skip distributedSystemId
if ((flags & VERSION_TWO_BYTES) != 0) {
m_entryVersion = input.readInt16();
m_entryVersion &= 0xffff;
diff --git a/cppcache/src/VersionedCacheableObjectPartList.cpp b/cppcache/src/VersionedCacheableObjectPartList.cpp
index 2c8c80c..37e4d9f 100644
--- a/cppcache/src/VersionedCacheableObjectPartList.cpp
+++ b/cppcache/src/VersionedCacheableObjectPartList.cpp
@@ -185,7 +185,8 @@ void VersionedCacheableObjectPartList::fromData(DataInput& input) {
} // hasObjects ends here
if (m_hasTags) {
- len = static_cast<int32_t>(input.readUnsignedVL());;
+ len = static_cast<int32_t>(input.readUnsignedVL());
+ ;
m_versionTags.resize(len);
std::vector<uint16_t> ids;
MemberListForVersionStamp& memberListForVersionStamp =
diff --git a/cppcache/test/DataInputTest.cpp b/cppcache/test/DataInputTest.cpp
index 72c158b..63264bd 100644
--- a/cppcache/test/DataInputTest.cpp
+++ b/cppcache/test/DataInputTest.cpp
@@ -143,7 +143,7 @@ class TestDataInput {
int32_t readNativeInt32() { return m_dataInput.readNativeInt32(); }
bool readNativeString(CacheableStringPtr &csPtr) {
- csPtr = m_dataInput.readNativeString();
+ csPtr = m_dataInput.readNativeString();
return csPtr != nullptr;
}
diff --git a/cppcache/test/StructSetTest.cpp b/cppcache/test/StructSetTest.cpp
index df1c085..e833b1b 100644
--- a/cppcache/test/StructSetTest.cpp
+++ b/cppcache/test/StructSetTest.cpp
@@ -36,11 +36,10 @@ TEST(StructSetTest, Basic) {
values->push_back(CacheableString::create(value.c_str()));
fieldNames.push_back(CacheableString::create(field.c_str()));
}
-
+
auto ss = StructSetImpl(values, fieldNames);
-
- ASSERT_EQ(1, ss.size());
+ ASSERT_EQ(1, ss.size());
}
TEST(StructSetTest, MissingFieldIndex) {
@@ -57,9 +56,9 @@ TEST(StructSetTest, MissingFieldIndex) {
values->push_back(CacheableString::create(value.c_str()));
fieldNames.push_back(CacheableString::create(field.c_str()));
}
-
+
auto ss = StructSetImpl(values, fieldNames);
-
+
ASSERT_THROW(ss.getFieldIndex("test"), std::invalid_argument);
}
@@ -77,8 +76,8 @@ TEST(StructSetTest, MissingFieldName) {
values->push_back(CacheableString::create(value.c_str()));
fieldNames.push_back(CacheableString::create(field.c_str()));
}
-
+
auto ss = StructSetImpl(values, fieldNames);
-
+
ASSERT_THROW(ss.getFieldName(100), std::out_of_range);
}
--
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.