コード例 #1
0
ファイル: VistaApi.cs プロジェクト: blinds52/ManagedEsent-1
 /// <summary>
 /// Retrieves the list of instances and databases that are part of the
 /// snapshot session at any given moment.
 /// </summary>
 /// <param name="snapshot">The identifier of the snapshot session.</param>
 /// <param name="numInstances">Returns the number of instances.</param>
 /// <param name="instances">Returns information about the instances.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotGetFreezeInfo(
     JET_OSSNAPID snapshot,
     out int numInstances,
     out JET_INSTANCE_INFO[] instances,
     SnapshotGetFreezeInfoGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotGetFreezeInfo(snapshot, out numInstances, out instances, grbit));
 }
コード例 #2
0
        public void JetOssnapidToStringFormat()
        {
            var value = new JET_OSSNAPID {
                Value = (IntPtr)0x123ABC
            };

            Assert.AreEqual("123ABC", string.Format("{0:X}", value));
        }
コード例 #3
0
        public void JetOssnapidToStringGeneralFormat()
        {
            var value = new JET_OSSNAPID {
                Value = (IntPtr)0x123ABC
            };

            VerifyIFormattableGeneralEqualsToString(value);
        }
コード例 #4
0
        public void JetOsSnapidToString()
        {
            var ossnapid = new JET_OSSNAPID {
                Value = (IntPtr)0x123ABC
            };

            Assert.AreEqual("JET_OSSNAPID(0x123abc)", ossnapid.ToString());
        }
コード例 #5
0
        public void VerifyJetOsSnapidInequality()
        {
            var x = JET_OSSNAPID.Nil;
            var y = new JET_OSSNAPID {
                Value = (IntPtr)0x7
            };

            TestUnequalObjects(x, y);
            Assert.IsTrue(x != y);
            Assert.IsFalse(x == y);
        }
コード例 #6
0
        public void VerifyOssnapidIsInvalidWorksAsExpected()
        {
            var zero     = JET_OSSNAPID.Nil;
            var minusOne = new JET_OSSNAPID()
            {
                Value = new IntPtr(~0)
            };
            var shouldBeValid = new JET_OSSNAPID()
            {
                Value = new IntPtr(4)
            };

            Assert.IsTrue(zero.IsInvalid);
            Assert.IsTrue(minusOne.IsInvalid);
            Assert.IsFalse(shouldBeValid.IsInvalid);
        }
コード例 #7
0
ファイル: VistaApi.cs プロジェクト: blinds52/ManagedEsent-1
 /// <summary>
 /// Truncates the log for a specified instance during a snapshot session.
 /// </summary>
 /// <remarks>
 /// This function should be called only if the snapshot was created with the
 /// <see cref="VistaGrbits.ContinueAfterThaw"/> option. Otherwise, the snapshot
 /// session ends after the call to <see cref="Api.JetOSSnapshotThaw"/>.
 /// </remarks>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="instance">The instance to truncat the log for.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotTruncateLogInstance(JET_OSSNAPID snapshot, JET_INSTANCE instance, SnapshotTruncateLogGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotTruncateLogInstance(snapshot, instance, grbit));
 }
コード例 #8
0
ファイル: VistaApi.cs プロジェクト: blinds52/ManagedEsent-1
 /// <summary>
 /// Enables log truncation for all instances that are part of the snapshot session.
 /// </summary>
 /// <remarks>
 /// This function should be called only if the snapshot was created with the
 /// <see cref="VistaGrbits.ContinueAfterThaw"/> option. Otherwise, the snapshot
 /// session ends after the call to <see cref="Api.JetOSSnapshotThaw"/>.
 /// </remarks>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotTruncateLog(JET_OSSNAPID snapshot, SnapshotTruncateLogGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotTruncateLog(snapshot, grbit));
 }
コード例 #9
0
ファイル: Api.cs プロジェクト: 925coder/ravendb
 /// <summary>
 /// Notifies the engine that it can resume normal IO operations after a
 /// freeze period and a successful snapshot.
 /// </summary>
 /// <param name="snapshot">The ID of the snapshot.</param>
 /// <param name="grbit">Thaw options.</param>
 public static void JetOSSnapshotThaw(JET_OSSNAPID snapshot, SnapshotThawGrbit grbit)
 {
     Api.Check(Impl.JetOSSnapshotThaw(snapshot, grbit));
 }
コード例 #10
0
ファイル: ToStringTests.cs プロジェクト: 925coder/ravendb
 public void JetOssnapidToStringFormat()
 {
     var value = new JET_OSSNAPID { Value = (IntPtr)0x123ABC };
     Assert.AreEqual("123ABC", String.Format("{0:X}", value));
 }
コード例 #11
0
 /// <summary>
 /// Notifies the engine that it can resume normal IO operations after a
 /// freeze period ended with a failed snapshot.
 /// </summary>
 /// <param name="snapid">Identifier of the snapshot session.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotAbort(JET_OSSNAPID snapid, SnapshotAbortGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotAbort(snapid, grbit));
 }
コード例 #12
0
ファイル: VistaApi.cs プロジェクト: jtmueller/ravendb
 /// <summary>
 /// Enables log truncation for all instances that are part of the snapshot session.
 /// </summary>
 /// <remarks>
 /// This function should be called only if the snapshot was created with the
 /// <see cref="VistaGrbits.ContinueAfterThaw"/> option. Otherwise, the snapshot
 /// session ends after the call to <see cref="Api.JetOSSnapshotThaw"/>.
 /// </remarks>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotTruncateLog(JET_OSSNAPID snapshot, SnapshotTruncateLogGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotTruncateLog(snapshot, grbit));
 }
コード例 #13
0
ファイル: VistaApi.cs プロジェクト: jtmueller/ravendb
 /// <summary>
 /// Selects a specific instance to be part of the snapshot session.
 /// </summary>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="instance">The instance to add to the snapshot.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotPrepareInstance(JET_OSSNAPID snapshot, JET_INSTANCE instance, SnapshotPrepareInstanceGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotPrepareInstance(snapshot, instance, grbit));
 }
コード例 #14
0
ファイル: VistaApi.cs プロジェクト: jtmueller/ravendb
 /// <summary>
 /// Notifies the engine that the snapshot session finished.
 /// </summary>
 /// <param name="snapshot">The identifier of the snapshot session.</param>
 /// <param name="grbit">Snapshot end options.</param>
 public static void JetOSSnapshotEnd(JET_OSSNAPID snapshot, SnapshotEndGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotEnd(snapshot, grbit));
 }
コード例 #15
0
ファイル: VistaApi.cs プロジェクト: jtmueller/ravendb
 /// <summary>
 /// Truncates the log for a specified instance during a snapshot session.
 /// </summary>
 /// <remarks>
 /// This function should be called only if the snapshot was created with the
 /// <see cref="VistaGrbits.ContinueAfterThaw"/> option. Otherwise, the snapshot
 /// session ends after the call to <see cref="Api.JetOSSnapshotThaw"/>.
 /// </remarks>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="instance">The instance to truncat the log for.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotTruncateLogInstance(JET_OSSNAPID snapshot, JET_INSTANCE instance, SnapshotTruncateLogGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotTruncateLogInstance(snapshot, instance, grbit));
 }
コード例 #16
0
ファイル: VistaApi.cs プロジェクト: blinds52/ManagedEsent-1
 /// <summary>
 /// Notifies the engine that the snapshot session finished.
 /// </summary>
 /// <param name="snapshot">The identifier of the snapshot session.</param>
 /// <param name="grbit">Snapshot end options.</param>
 public static void JetOSSnapshotEnd(JET_OSSNAPID snapshot, SnapshotEndGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotEnd(snapshot, grbit));
 }
コード例 #17
0
ファイル: VistaApi.cs プロジェクト: blinds52/ManagedEsent-1
 /// <summary>
 /// Selects a specific instance to be part of the snapshot session.
 /// </summary>
 /// <param name="snapshot">The snapshot identifier.</param>
 /// <param name="instance">The instance to add to the snapshot.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotPrepareInstance(JET_OSSNAPID snapshot, JET_INSTANCE instance, SnapshotPrepareInstanceGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotPrepareInstance(snapshot, instance, grbit));
 }
コード例 #18
0
ファイル: Api.cs プロジェクト: 925coder/ravendb
 /// <summary>
 /// Starts a snapshot. While the snapshot is in progress, no
 /// write-to-disk activity by the engine can take place.
 /// </summary>
 /// <param name="snapshot">The snapshot session.</param>
 /// <param name="numInstances">
 /// Returns the number of instances that are part of the snapshot session.
 /// </param>
 /// <param name="instances">
 /// Returns information about the instances that are part of the snapshot session.
 /// </param>
 /// <param name="grbit">
 /// Snapshot freeze options.
 /// </param>
 public static void JetOSSnapshotFreeze(JET_OSSNAPID snapshot, out int numInstances, out JET_INSTANCE_INFO[] instances, SnapshotFreezeGrbit grbit)
 {
     Api.Check(Impl.JetOSSnapshotFreeze(snapshot, out numInstances, out instances, grbit));
 }
コード例 #19
0
ファイル: ToStringTests.cs プロジェクト: Rationalle/ravendb
 public void JetOsSnapidToString()
 {
     var ossnapid = new JET_OSSNAPID { Value = (IntPtr)0x123ABC };
     Assert.AreEqual("JET_OSSNAPID(0x123abc)", ossnapid.ToString());
 }
コード例 #20
0
ファイル: Api.cs プロジェクト: 925coder/ravendb
 /// <summary>
 /// Begins the preparations for a snapshot session. A snapshot session
 /// is a short time interval in which the engine does not issue any
 /// write IOs to disk, so that the engine can participate in a volume
 /// snapshot session (when driven by a snapshot writer).
 /// </summary>
 /// <param name="snapshot">Returns the ID of the snapshot session.</param>
 /// <param name="grbit">Snapshot options.</param>
 public static void JetOSSnapshotPrepare(out JET_OSSNAPID snapshot, SnapshotPrepareGrbit grbit)
 {
     Api.Check(Impl.JetOSSnapshotPrepare(out snapshot, grbit));
 }
コード例 #21
0
ファイル: Server2003Api.cs プロジェクト: j2jensen/ravendb
 /// <summary>
 /// Notifies the engine that it can resume normal IO operations after a
 /// freeze period ended with a failed snapshot.
 /// </summary>
 /// <param name="snapid">Identifier of the snapshot session.</param>
 /// <param name="grbit">Options for this call.</param>
 public static void JetOSSnapshotAbort(JET_OSSNAPID snapid, SnapshotAbortGrbit grbit)
 {
     Api.Check(Api.Impl.JetOSSnapshotAbort(snapid, grbit));
 }
コード例 #22
0
ファイル: ToStringTests.cs プロジェクト: 925coder/ravendb
 public void JetOssnapidToStringGeneralFormat()
 {
     var value = new JET_OSSNAPID { Value = (IntPtr)0x123ABC };
     VerifyIFormattableGeneralEqualsToString(value);
 }