public boolean addReplicationCommandBlockToStore( CReplicationCommandBlock ReplicationCommandBlock, CExtendedLogger Logger, CLanguage Lang ) {

		boolean bResult = false;
		
		try {

			if ( ReplicationCommandBlock.strInstanceID.equals( strInstanceID ) ) {
			
				StringBuilder CommandBlock = new StringBuilder();

				CommandBlock.append( "<CommandBlock>\n" );
				CommandBlock.append( "<InstanceID>" + ReplicationCommandBlock.strInstanceID + "</InstanceID>\n" );
				CommandBlock.append( "<SourceDataBlockID>" + ReplicationCommandBlock.strSourceDataBlockID + "</SourceDataBlockID>\n" );
				CommandBlock.append( "<TransactionID>" + ReplicationCommandBlock.strTransactionID + "</TransactionID>\n" );
				CommandBlock.append( "<DataBlockID>" + ReplicationCommandBlock.strDataBlockID + "</DataBlockID>\n" );
				CommandBlock.append( "<CommandID>" + ReplicationCommandBlock.strCommandID + "</CommandID>\n" );
				CommandBlock.append( "<Command><![CDATA[\n" );
				CommandBlock.append( ReplicationCommandBlock.strCommand + "\n" );
				CommandBlock.append( "]]></Command>\n" );
				CommandBlock.append( "<User>" + ReplicationCommandBlock.strUser + "</User>\n" );
				CommandBlock.append( "<Database>" + ReplicationCommandBlock.strDatabase + "</Database>\n" );

				for ( Entry<String,String> Param : ReplicationCommandBlock.Params.entrySet() ) {

					CommandBlock.append( "<Param><![CDATA[\n" );
					CommandBlock.append( Param.getKey() + "\"=" + Param.getValue() + "\n" );
					CommandBlock.append( "]]></Param>\n" );

				}

				//CurrentReplicationStoreFileWriter.println( _End_Command_Block );
				CommandBlock.append( "</CommandBlock>\n" );

				int intOrigNumberLength = Long.toString( CommandBlock.length() ).length();

				String strCommandBlockLength = "<CommandBlockLength>" + Integer.toString( CommandBlock.length() ) + "</CommandBlockLength>\n";

				long lngTotal = CommandBlock.length() + strCommandBlockLength.length();

				int intLastNumberLength = Long.toString( lngTotal ).length();

				if ( intLastNumberLength > intOrigNumberLength ) {

					lngTotal += intLastNumberLength - intOrigNumberLength;

				}

				CommandBlock.insert( CommandBlock.length(), "<CommandBlockLength>" + Long.toString( lngTotal ) + "</CommandBlockLength>\n" );

				LockWriter.acquire();

				if ( ReplicationStoreFilePath.length() >= intHeaderLength && ReplicationStoreFilePath.length() + CommandBlock.length() > PlainTextDBReplicationStore.ConfigPlainTextDBReplicationStore.lngMaxSizeDataBlock ) {

					createDataBlockFileStore( false, Logger, Lang ); //Force create store file for don't exceed the max size of replication store file

				}

				CurrentReplicationStoreFileWriter.print( CommandBlock.toString() );
				CurrentReplicationStoreFileWriter.flush();

				lngLastDataBlockWrite = System.currentTimeMillis();
				
				bResult = true;

			}
			
		}
		catch ( Error Err ) {

			if ( Logger != null )
				Logger.logError( "-1020", Err.getMessage(), Err );

		}
		catch ( Exception Ex ) {

			if ( Logger != null )
				Logger.logException( "-1021", Ex.getMessage(), Ex );

		}
		finally {
			
			LockWriter.release();

		}
		
		return bResult;
		
	}