[smuxi/experiments/sqlite: 6/27] [Engine] Added Flush() to IMessageBuffer
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi/experiments/sqlite: 6/27] [Engine] Added Flush() to IMessageBuffer
- Date: Sun, 23 Feb 2014 17:06:53 +0000 (UTC)
commit cabe53fce734d111dad184feac42fdeea5c4614d
Author: Mirco Bauer <meebey meebey net>
Date: Sun Feb 26 11:46:40 2012 +0100
[Engine] Added Flush() to IMessageBuffer
src/Engine/MessageBuffers/Db4oMessageBuffer.cs | 2 +-
src/Engine/MessageBuffers/GitMessageBuffer.cs | 2 +-
src/Engine/MessageBuffers/IMessageBuffer.cs | 1 +
src/Engine/MessageBuffers/ListMessageBuffer.cs | 5 +++++
src/Engine/MessageBuffers/MessageBufferBase.cs | 2 +-
5 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/Engine/MessageBuffers/Db4oMessageBuffer.cs b/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
index 5ad3cef..eff36b3 100644
--- a/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/Db4oMessageBuffer.cs
@@ -621,7 +621,7 @@ namespace Smuxi.Engine
#endif
}
- void Flush()
+ public override void Flush()
{
var counter = FlushCounter;
if (counter == 0) {
diff --git a/src/Engine/MessageBuffers/GitMessageBuffer.cs b/src/Engine/MessageBuffers/GitMessageBuffer.cs
index 7debc76..75f2aa0 100644
--- a/src/Engine/MessageBuffers/GitMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/GitMessageBuffer.cs
@@ -209,7 +209,7 @@ namespace Smuxi.Engine
}
#endregion
- void Flush()
+ public override void Flush()
{
Trace.Call();
diff --git a/src/Engine/MessageBuffers/IMessageBuffer.cs b/src/Engine/MessageBuffers/IMessageBuffer.cs
index 65d8961..fcd1cc9 100644
--- a/src/Engine/MessageBuffers/IMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/IMessageBuffer.cs
@@ -26,6 +26,7 @@ namespace Smuxi.Engine
public interface IMessageBuffer : IList<MessageModel>, IDisposable
{
IList<MessageModel> GetRange(int offset, int limit);
+ void Flush();
int MaxCapacity { get; set; }
}
}
diff --git a/src/Engine/MessageBuffers/ListMessageBuffer.cs b/src/Engine/MessageBuffers/ListMessageBuffer.cs
index 03a1206..d6ef362 100644
--- a/src/Engine/MessageBuffers/ListMessageBuffer.cs
+++ b/src/Engine/MessageBuffers/ListMessageBuffer.cs
@@ -58,6 +58,11 @@ namespace Smuxi.Engine
return base.GetRange(offset, limit);
}
+ public void Flush()
+ {
+ // NOOP
+ }
+
public void Dispose()
{
// NOOP
diff --git a/src/Engine/MessageBuffers/MessageBufferBase.cs b/src/Engine/MessageBuffers/MessageBufferBase.cs
index 144effb..823ab43 100644
--- a/src/Engine/MessageBuffers/MessageBufferBase.cs
+++ b/src/Engine/MessageBuffers/MessageBufferBase.cs
@@ -100,7 +100,7 @@ namespace Smuxi.Engine
public abstract int IndexOf(MessageModel item);
public abstract void Insert(int index, MessageModel item);
public abstract void RemoveAt(int index);
- public abstract IList<MessageModel> GetRange(int offset, int limit);
+ public abstract void Flush();
public abstract void Dispose();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]