Beispiel #1
0
 public void DeleteStream(string bucketId, string streamId)
 {
     Logger.Warn(Messages.DeletingStream, streamId, bucketId);
     TryMongo(() =>
     {
         PersistedStreamHeads.Remove(Query.And(Query.EQ("_id.BucketId", bucketId), Query.EQ("_id.StreamId", streamId)));
         PersistedSnapshots.Remove(Query.And(Query.EQ("_id.BucketId", bucketId), Query.EQ("_id.StreamId", streamId)));
         PersistedCommits.Remove(Query.And(Query.EQ("_id.BucketId", bucketId), Query.EQ("_id.StreamId", streamId)));
     });
 }
 public void Purge(string bucketId)
 {
     Logger.Warn(Messages.PurgingBucket, bucketId);
     TryMongo(() =>
     {
         PersistedStreamHeads.Remove(Query.EQ(MongoStreamHeadFields.FullQualifiedBucketId, bucketId));
         PersistedSnapshots.Remove(Query.EQ(MongoShapshotFields.FullQualifiedBucketId, bucketId));
         PersistedCommits.Remove(Query.EQ(MongoCommitFields.BucketId, bucketId));
     });
 }
Beispiel #3
0
 public void Purge(string bucketId)
 {
     Logger.Warn(Messages.PurgingBucket, bucketId);
     TryMongo(() =>
     {
         PersistedStreamHeads.Remove(Query.EQ("_id.BucketId", bucketId));
         PersistedSnapshots.Remove(Query.EQ("_id.BucketId", bucketId));
         PersistedCommits.Remove(Query.EQ("_id.BucketId", bucketId));
     });
 }
        public void EmptyRecycleBin()
        {
            var lastCheckpointNumber = _getLastCheckPointNumber();

            TryMongo(() =>
            {
                PersistedCommits.Remove(Query.And(
                                            Query.EQ(MongoCommitFields.BucketId, MongoSystemBuckets.RecycleBin),
                                            Query.LT(MongoCommitFields.CheckpointNumber, lastCheckpointNumber)
                                            ));
            });
        }