@@ -0,0 +1,1934 @@
+/**%0A * @Copyright to Yonggang.Yang .%0A * @ClassName: GeneralDBClient.%0A * @Project: AutoShardingDBPlatform.%0A * @Package: generaldbplatform.%0A * @Description: The basic client of the auto sharding general database platform.%0A * @Author: Yonggang.Yang %0A * @Version: V2.0%0A * @Date: 2015-07-22%0A * @History: %0A *    1.2015-07-21 First version of GeneralDBClient was written.%0A */%0A%0A//package name.%0Apackage generaldbplatform;%0A%0A%0A%0A%0Apublic class GeneralDBClient %0A%7B%0A%09/**%0A     * @FieldName: mCacheClient.%0A     * @Description: the cache database client as a private member, just can be used by the GeneralDBClient itself.%0A     *               (when we use the client, we get the cache database real client according to the key).%0A     */%0A    private CacheLayerClient mCacheClient;%0A    %0A%09/**%0A     * @FieldName: mPersistClient.%0A     * @Description: the persistent database client as a private member,just can be used by the GeneralDBClient itself.%0A     *               (when we use the client, we get the persistent database real client according to the key).%0A     */%0A    private PersistentLayerClient mPersistClient;%0A    %0A%09/**%0A     * @FieldName: allClientOK.%0A     * @Description: a boolean value which indicates the states of the CacheClient & PersistClient.%0A     *               (when both ok, and this boolean value should be true).%0A     *               the GeneralDBClient user could check this value to decide when to start the service.%0A     */%0A    protected boolean allClientOK = false;%0A    %0A    %0A%0A    %0A    %0A    public GeneralDBClient(String ip, String cache_channel, String persist_channel)%0A    %7B%0A    %09this.mCacheClient = new CacheLayerClient(ip, cache_channel);%0A    %09this.mPersistClient = new PersistentLayerClient(ip, persist_channel);%0A    %09%0A    %09if((this.mCacheClient.CachaInitOK == true) && (this.mPersistClient.PersistInitOK == true))%0A    %09%7B%0A    %09%09this.allClientOK = true;%0A    %09%7D%0A    %09else%0A    %09%7B%0A    %09%09this.allClientOK = false;%0A    %09%7D%0A    %7D%0A%7D%0A

Create GeneralDBClient.java