THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Exception.h b/lib/cpp/src/concurrency/Exception.h
index 00e2649..cdc8538 100644
--- a/lib/cpp/src/concurrency/Exception.h
+++ b/lib/cpp/src/concurrency/Exception.h
@@ -10,31 +10,31 @@
#include <exception>
#include <Thrift.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
-class NoSuchTaskException : public facebook::thrift::TException {};
+class NoSuchTaskException : public apache::thrift::TException {};
-class UncancellableTaskException : public facebook::thrift::TException {};
+class UncancellableTaskException : public apache::thrift::TException {};
-class InvalidArgumentException : public facebook::thrift::TException {};
+class InvalidArgumentException : public apache::thrift::TException {};
-class IllegalStateException : public facebook::thrift::TException {};
+class IllegalStateException : public apache::thrift::TException {};
-class TimedOutException : public facebook::thrift::TException {
+class TimedOutException : public apache::thrift::TException {
public:
TimedOutException():TException("TimedOutException"){};
TimedOutException(const std::string& message ) :
TException(message) {}
};
-class TooManyPendingTasksException : public facebook::thrift::TException {
+class TooManyPendingTasksException : public apache::thrift::TException {
public:
TooManyPendingTasksException():TException("TooManyPendingTasksException"){};
TooManyPendingTasksException(const std::string& message ) :
TException(message) {}
};
-class SystemResourceException : public facebook::thrift::TException {
+class SystemResourceException : public apache::thrift::TException {
public:
SystemResourceException() {}
@@ -42,6 +42,6 @@
TException(message) {}
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_
diff --git a/lib/cpp/src/concurrency/FunctionRunner.h b/lib/cpp/src/concurrency/FunctionRunner.h
index 94ab837..6379c1c 100644
--- a/lib/cpp/src/concurrency/FunctionRunner.h
+++ b/lib/cpp/src/concurrency/FunctionRunner.h
@@ -10,7 +10,7 @@
#include <tr1/functional>
#include "thrift/lib/cpp/concurrency/Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Convenient implementation of Runnable that will execute arbitrary callbacks.
@@ -60,6 +60,6 @@
VoidFunc func_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H
diff --git a/lib/cpp/src/concurrency/Monitor.cpp b/lib/cpp/src/concurrency/Monitor.cpp
index 932ae68..81855dc 100644
--- a/lib/cpp/src/concurrency/Monitor.cpp
+++ b/lib/cpp/src/concurrency/Monitor.cpp
@@ -15,7 +15,7 @@
#include <pthread.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Monitor implementation using the POSIX pthread library
@@ -122,4 +122,4 @@
void Monitor::notifyAll() const { impl_->notifyAll(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Monitor.h b/lib/cpp/src/concurrency/Monitor.h
index 1eb36eb..fe7bf11 100644
--- a/lib/cpp/src/concurrency/Monitor.h
+++ b/lib/cpp/src/concurrency/Monitor.h
@@ -9,7 +9,7 @@
#include "Exception.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A monitor is a combination mutex and condition-event. Waiting and
@@ -67,6 +67,6 @@
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_
diff --git a/lib/cpp/src/concurrency/Mutex.cpp b/lib/cpp/src/concurrency/Mutex.cpp
index b160b67..af68db6 100644
--- a/lib/cpp/src/concurrency/Mutex.cpp
+++ b/lib/cpp/src/concurrency/Mutex.cpp
@@ -11,7 +11,7 @@
using boost::shared_ptr;
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Implementation of Mutex class using POSIX mutex
@@ -145,5 +145,5 @@
void ReadWriteMutex::release() const { impl_->release(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h
index 3b8631b..92eb0db 100644
--- a/lib/cpp/src/concurrency/Mutex.h
+++ b/lib/cpp/src/concurrency/Mutex.h
@@ -9,7 +9,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A simple mutex class
@@ -95,6 +95,6 @@
#define RWGuard(m) incorrect_use_of_RWGuard(m)
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.cpp b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
index 001d6ad..9655a86 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.cpp
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.cpp
@@ -18,7 +18,7 @@
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::weak_ptr;
@@ -293,4 +293,4 @@
Thread::id_t PosixThreadFactory::getCurrentThreadId() const { return impl_->getCurrentThreadId(); }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/PosixThreadFactory.h b/lib/cpp/src/concurrency/PosixThreadFactory.h
index 0f12fc9..66df4b3 100644
--- a/lib/cpp/src/concurrency/PosixThreadFactory.h
+++ b/lib/cpp/src/concurrency/PosixThreadFactory.h
@@ -11,7 +11,7 @@
#include <boost/shared_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* A thread factory to create posix threads
@@ -113,6 +113,6 @@
boost::shared_ptr<Impl> impl_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_
diff --git a/lib/cpp/src/concurrency/Thread.h b/lib/cpp/src/concurrency/Thread.h
index 39ee816..0ce5e17 100644
--- a/lib/cpp/src/concurrency/Thread.h
+++ b/lib/cpp/src/concurrency/Thread.h
@@ -10,7 +10,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
class Thread;
@@ -49,7 +49,7 @@
* is difficult to abstract across platforms and is left for platform-specific
* ThreadFactory implemtations to deal with
*
- * @see facebook::thrift::concurrency::ThreadFactory)
+ * @see apache::thrift::concurrency::ThreadFactory)
*/
class Thread {
@@ -107,6 +107,6 @@
virtual Thread::id_t getCurrentThreadId() const = 0;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_
diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/concurrency/ThreadManager.cpp
index 34acc4c..11c19a8 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/concurrency/ThreadManager.cpp
@@ -18,7 +18,7 @@
#include <iostream>
#endif //defined(DEBUG)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
@@ -477,5 +477,5 @@
return shared_ptr<ThreadManager>(new SimpleThreadManager(count, pendingTaskCountMax));
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/ThreadManager.h b/lib/cpp/src/concurrency/ThreadManager.h
index 7bca5d0..b973b08 100644
--- a/lib/cpp/src/concurrency/ThreadManager.h
+++ b/lib/cpp/src/concurrency/ThreadManager.h
@@ -11,7 +11,7 @@
#include <sys/types.h>
#include "Thread.h"
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Thread Pool Manager and related classes
@@ -152,6 +152,6 @@
class Impl;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_
diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/concurrency/TimerManager.cpp
index e3b7a89..c9555fb 100644
--- a/lib/cpp/src/concurrency/TimerManager.cpp
+++ b/lib/cpp/src/concurrency/TimerManager.cpp
@@ -12,7 +12,7 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
using boost::shared_ptr;
@@ -268,5 +268,5 @@
const TimerManager::STATE TimerManager::state() const { return state_; }
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/TimerManager.h b/lib/cpp/src/concurrency/TimerManager.h
index 6d2eae9..3729646 100644
--- a/lib/cpp/src/concurrency/TimerManager.h
+++ b/lib/cpp/src/concurrency/TimerManager.h
@@ -15,7 +15,7 @@
#include <map>
#include <time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Timer Manager
@@ -103,6 +103,6 @@
boost::shared_ptr<Thread> dispatcherThread_;
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_
diff --git a/lib/cpp/src/concurrency/Util.cpp b/lib/cpp/src/concurrency/Util.cpp
index eeee0e5..c220238 100644
--- a/lib/cpp/src/concurrency/Util.cpp
+++ b/lib/cpp/src/concurrency/Util.cpp
@@ -16,7 +16,7 @@
#include <sys/time.h>
#endif // defined(HAVE_CLOCK_GETTIME)
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
const int64_t Util::currentTime() {
int64_t result;
@@ -39,4 +39,4 @@
}
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/concurrency/Util.h
index 483d14a..fa5b7f4 100644
--- a/lib/cpp/src/concurrency/Util.h
+++ b/lib/cpp/src/concurrency/Util.h
@@ -13,7 +13,7 @@
#include <time.h>
#include <sys/time.h>
-namespace facebook { namespace thrift { namespace concurrency {
+namespace apache { namespace thrift { namespace concurrency {
/**
* Utility methods
@@ -83,6 +83,6 @@
static const int64_t currentTime();
};
-}}} // facebook::thrift::concurrency
+}}} // apache::thrift::concurrency
#endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_
diff --git a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
index 0dcf0bb..440f69b 100644
--- a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
@@ -14,10 +14,10 @@
#include <iostream>
#include <set>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
using boost::shared_ptr;
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -341,5 +341,5 @@
const double ThreadFactoryTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency::test
+}}}} // apache::thrift::concurrency::test
diff --git a/lib/cpp/src/concurrency/test/ThreadManagerTests.h b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
index 261ad5e..feb3e47 100644
--- a/lib/cpp/src/concurrency/test/ThreadManagerTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
@@ -16,9 +16,9 @@
#include <set>
#include <stdint.h>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -348,7 +348,7 @@
const double ThreadManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency
-using namespace facebook::thrift::concurrency::test;
+using namespace apache::thrift::concurrency::test;
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index 13e3ef8..9e4e757 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -12,9 +12,9 @@
#include <assert.h>
#include <iostream>
-namespace facebook { namespace thrift { namespace concurrency { namespace test {
+namespace apache { namespace thrift { namespace concurrency { namespace test {
-using namespace facebook::thrift::concurrency;
+using namespace apache::thrift::concurrency;
/**
* ThreadManagerTests class
@@ -126,5 +126,5 @@
const double TimerManagerTests::ERROR = .20;
-}}}} // facebook::thrift::concurrency
+}}}} // apache::thrift::concurrency