private bool RequestBlockModeInStore()
        {
            Exception ex = null;

            using (IStoreRpc newStoreControllerInstance = Dependencies.GetNewStoreControllerInstance(this.LocalNodeName))
            {
                try
                {
                    newStoreControllerInstance.StartBlockModeReplicationToPassive(this.Database.DatabaseGuid, this.m_clientNodeName, (uint)this.m_currentLogGeneration);
                    this.EnteredBlockMode = true;
                    LogCopyServerContext.Tracer.TraceDebug <string, long>((long)this.GetHashCode(), "BlockMode entered for copy '{0}' at 0x{1:X}", this.PassiveCopyName, this.m_currentLogGeneration);
                    return(true);
                }
                catch (MapiPermanentException ex2)
                {
                    ex = ex2;
                }
                catch (MapiRetryableException ex3)
                {
                    ex = ex3;
                }
                if (ex != null)
                {
                    LogCopyServerContext.Tracer.TraceError <string, Exception>((long)this.GetHashCode(), "EnterBlockMode({0}) failed from store: {1}", this.PassiveCopyName, ex);
                }
            }
            return(false);
        }
Example #2
0
 public static IStoreRpc GetNewStoreControllerInstance(string serverNameOrFqdn)
 {
     return(Dependencies.GetNewStoreControllerInstance(serverNameOrFqdn, null));
 }