Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NorthScale -> Membase rename.

The company has changed its name, so the client follows.
  • Loading branch information...
commit 3a7bfee1ce54ea8c142020bc971608d40f28d749 1 parent ddd582c
Attila Kiskó enyim authored
Showing with 194 additions and 177 deletions.
  1. +1 −1  DemoApp/App.config
  2. +2 −2 DemoApp/DemoApp.csproj
  3. +2 −2 DemoApp/Program.cs
  4. +1 −1  Enyim.Caching.sln
  5. +6 −6 {Northscale.Store → Membase}/App.config
  6. +1 −1  {Northscale.Store → Membase}/BucketConfigListener.cs
  7. +1 −1  {Northscale.Store → Membase}/ConfigHelper.cs
  8. +1 −1  {Northscale.Store → Membase}/Configuration/BucketPortType.cs
  9. +2 −2 ...Configuration/INorthScaleClientConfiguration.cs → Membase/Configuration/IMembaseClientConfiguration.cs
  10. +11 −11 ...e/Configuration/NorthScaleClientConfiguration.cs → Membase/Configuration/MembaseClientConfiguration.cs
  11. +12 −12 Northscale.Store/Configuration/NorthScaleClientSection.cs → Membase/Configuration/MembaseClientSection.cs
  12. +1 −1  {Northscale.Store → Membase}/Configuration/ServersElement.cs
  13. +1 −1  {Northscale.Store → Membase}/Configuration/UriElement.cs
  14. +1 −1  {Northscale.Store → Membase}/Configuration/UriElementCollection.cs
  15. +1 −1  {Northscale.Store → Membase}/Configuration/UriValidator.cs
  16. +1 −1  {Northscale.Store → Membase}/Deserialization.cs
  17. +8 −8 Northscale.Store/Northscale.Store.csproj → Membase/Membase.csproj
  18. +21 −21 Northscale.Store/NorthScaleClient.cs → Membase/MembaseClient.cs
  19. +13 −14 Northscale.Store/NorthScalePool.cs → Membase/MembasePool.cs
  20. +1 −1  {Northscale.Store → Membase}/MessageStreamListener.cs
  21. +2 −2 {Northscale.Store → Membase}/Properties/AssemblyInfo.cs
  22. +1 −1  {Northscale.Store → Membase}/VBucketAwareOperationFactory.cs
  23. +3 −3 {Northscale.Store → Membase}/WebClientWithTimeout.cs
  24. +21 −12 MemcachedTest/103.config
  25. +26 −22 MemcachedTest/App.config
  26. +1 −1  MemcachedTest/{NorthScaleMembaseClientTest.cs → MembaseClientTest.cs}
  27. +2 −2 MemcachedTest/{NorthScaleMemcachedClientTest.cs → MembaseMemcachedBucketTest.cs}
  28. +4 −3 MemcachedTest/MemcachedTest.csproj
  29. +6 −6 MemcachedTest/b4.config
  30. +1 −1  README.mdown
  31. +7 −4 TestApp/App.config
  32. +21 −20 TestApp/Program.cs
  33. +2 −2 TestApp/TestApp.csproj
  34. +9 −9 build-release.msbuild
2  DemoApp/App.config
View
@@ -6,7 +6,7 @@
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
</sectionGroup>
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
- <section name="northscale" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="northscale" type="Membase.Configuration.MembaseClientSection, Membase" />
</configSections>
<northscale>
4 DemoApp/DemoApp.csproj
View
@@ -80,9 +80,9 @@
<Project>{D438C0B3-A168-40B8-BDDD-61F0939DFF35}</Project>
<Name>Enyim.Caching</Name>
</ProjectReference>
- <ProjectReference Include="..\Northscale.Store\Northscale.Store.csproj">
+ <ProjectReference Include="..\Membase\Membase.csproj">
<Project>{708A2350-A26C-444D-B975-8164263951A7}</Project>
- <Name>Northscale.Store</Name>
+ <Name>Membase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
4 DemoApp/Program.cs
View
@@ -5,8 +5,8 @@
using Enyim.Caching.Memcached;
using System.Net;
using Enyim.Caching.Configuration;
-using NorthScale.Store;
-using NorthScale.Store.Configuration;
+using Membase;
+using Membase.Configuration;
using System.Threading;
namespace DemoApp
2  Enyim.Caching.sln
View
@@ -14,7 +14,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MemcachedTest", "MemcachedT
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "DemoApp\DemoApp.csproj", "{7225B6E0-A1FB-4F64-A5C5-1F640E21C90B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NorthScale.Store", "Northscale.Store\NorthScale.Store.csproj", "{708A2350-A26C-444D-B975-8164263951A7}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Membase", "Membase\Membase.csproj", "{708A2350-A26C-444D-B975-8164263951A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{607B1927-A964-48B2-AEA3-6810D10A6831}"
EndProject
12 Northscale.Store/App.config → Membase/App.config
View
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
- <section name="northscale" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
</configSections>
<!--
- Use this section as a template if you're connecting to NorthScale Mecached Servers.
- Note: you must have the top-level northscale section if you're using the parameterless constructor of NorthScaleClient.
+ Use this section as a template if you're connecting to Membase Servers.
+ Note: you must have the top-level membase section if you're using the parameterless constructor of MembaseClient.
-->
- <northscale>
+ <membase>
<!--
bucket is optional and can be specified in the constructor,
so you can use the same configuration to connect to different buckets in the cluster
- you must provide userName and password if the memcached server is "secured" (membase is secured by default)
+ you must provide userName and password if the server is "secured" (membase is secured by default)
-->
<servers bucket="enyim" userName="Administrator" password="password">
@@ -24,6 +24,6 @@
</servers>
<!-- the client waits deadTmimeout time to reconnect to the pool when all the specified urls are down -->
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" deadTimeout="00:00:10" />
- </northscale>
+ </membase>
</configuration>
2  Northscale.Store/BucketConfigListener.cs → Membase/BucketConfigListener.cs
View
@@ -6,7 +6,7 @@
using System.Net;
using Enyim;
-namespace NorthScale.Store
+namespace Membase
{
internal class BucketConfigListener
{
2  Northscale.Store/ConfigHelper.cs → Membase/ConfigHelper.cs
View
@@ -6,7 +6,7 @@
using System.Web.Script.Serialization;
using System.IO;
-namespace NorthScale.Store
+namespace Membase
{
internal class ConfigHelper : IDisposable
{
2  Northscale.Store/Configuration/BucketPortType.cs → Membase/Configuration/BucketPortType.cs
View
@@ -3,7 +3,7 @@
using System.Linq;
using System.Text;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
public enum BucketPortType
{
4 ...e/Configuration/INorthScaleClientConfiguration.cs → Membase/Configuration/IMembaseClientConfiguration.cs
View
@@ -4,9 +4,9 @@
using Enyim.Caching.Configuration;
using Enyim.Caching.Memcached;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
- public interface INorthScaleClientConfiguration
+ public interface IMembaseClientConfiguration
{
/// <summary>
/// Gets the name of the bucket to be used. If not specified the "default" bucket will be used.
22 ...re/Configuration/NorthScaleClientConfiguration.cs → Membase/Configuration/MembaseClientConfiguration.cs
View
@@ -5,12 +5,12 @@
using Enyim.Caching.Memcached;
using Enyim.Reflection;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
/// <summary>
/// Configuration class
/// </summary>
- public class NorthScaleClientConfiguration : INorthScaleClientConfiguration
+ public class MembaseClientConfiguration : IMembaseClientConfiguration
{
private Type nodeLocator;
private ITranscoder transcoder;
@@ -19,7 +19,7 @@ public class NorthScaleClientConfiguration : INorthScaleClientConfiguration
/// <summary>
/// Initializes a new instance of the <see cref="T:MemcachedClientConfiguration"/> class.
/// </summary>
- public NorthScaleClientConfiguration()
+ public MembaseClientConfiguration()
{
this.Urls = new List<Uri>();
this.Port = BucketPortType.Direct;
@@ -94,27 +94,27 @@ public ITranscoder Transcoder
public BucketPortType Port { get; set; }
#region [ interface ]
- IList<Uri> INorthScaleClientConfiguration.Urls
+ IList<Uri> IMembaseClientConfiguration.Urls
{
get { return this.Urls; }
}
- NetworkCredential INorthScaleClientConfiguration.Credentials
+ NetworkCredential IMembaseClientConfiguration.Credentials
{
get { return this.Credentials; }
}
- ISocketPoolConfiguration INorthScaleClientConfiguration.SocketPool
+ ISocketPoolConfiguration IMembaseClientConfiguration.SocketPool
{
get { return this.SocketPool; }
}
- IMemcachedKeyTransformer INorthScaleClientConfiguration.CreateKeyTransformer()
+ IMemcachedKeyTransformer IMembaseClientConfiguration.CreateKeyTransformer()
{
return this.KeyTransformer;
}
- IMemcachedNodeLocator INorthScaleClientConfiguration.CreateNodeLocator()
+ IMemcachedNodeLocator IMembaseClientConfiguration.CreateNodeLocator()
{
var f = this.NodeLocatorFactory;
if (f != null) return f.Create();
@@ -124,17 +124,17 @@ IMemcachedNodeLocator INorthScaleClientConfiguration.CreateNodeLocator()
: (IMemcachedNodeLocator)FastActivator.Create(this.NodeLocator);
}
- ITranscoder INorthScaleClientConfiguration.CreateTranscoder()
+ ITranscoder IMembaseClientConfiguration.CreateTranscoder()
{
return this.Transcoder;
}
- string INorthScaleClientConfiguration.Bucket
+ string IMembaseClientConfiguration.Bucket
{
get { return this.Bucket; }
}
- BucketPortType INorthScaleClientConfiguration.Port
+ BucketPortType IMembaseClientConfiguration.Port
{
get { return this.Port; }
}
24 ...le.Store/Configuration/NorthScaleClientSection.cs → Membase/Configuration/MembaseClientSection.cs
View
@@ -7,12 +7,12 @@
using Enyim.Caching.Configuration;
using Enyim.Caching.Memcached;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
/// <summary>
- /// Configures the <see cref="T:MemcachedClient"/>. This class cannot be inherited.
+ /// Configures the <see cref="T:MembaseClient"/>. This class cannot be inherited.
/// </summary>
- public sealed class NorthScaleClientSection : ConfigurationSection, INorthScaleClientConfiguration
+ public sealed class MembaseClientSection : ConfigurationSection, IMembaseClientConfiguration
{
[ConfigurationProperty("servers", IsRequired = true)]
public ServersElement Servers
@@ -75,32 +75,32 @@ protected override void PostDeserialize()
}
#region [ interface ]
- IList<Uri> INorthScaleClientConfiguration.Urls
+ IList<Uri> IMembaseClientConfiguration.Urls
{
get { return this.Servers.Urls.ToUriCollection(); }
}
- ISocketPoolConfiguration INorthScaleClientConfiguration.SocketPool
+ ISocketPoolConfiguration IMembaseClientConfiguration.SocketPool
{
get { return this.SocketPool; }
}
- IMemcachedKeyTransformer INorthScaleClientConfiguration.CreateKeyTransformer()
+ IMemcachedKeyTransformer IMembaseClientConfiguration.CreateKeyTransformer()
{
return this.KeyTransformer.CreateInstance() ?? new DefaultKeyTransformer();
}
- IMemcachedNodeLocator INorthScaleClientConfiguration.CreateNodeLocator()
+ IMemcachedNodeLocator IMembaseClientConfiguration.CreateNodeLocator()
{
return this.NodeLocator.CreateInstance() ?? new KetamaNodeLocator();
}
- ITranscoder INorthScaleClientConfiguration.CreateTranscoder()
+ ITranscoder IMembaseClientConfiguration.CreateTranscoder()
{
return this.Transcoder.CreateInstance() ?? new DefaultTranscoder();
}
- NetworkCredential INorthScaleClientConfiguration.Credentials
+ NetworkCredential IMembaseClientConfiguration.Credentials
{
get
{
@@ -111,17 +111,17 @@ NetworkCredential INorthScaleClientConfiguration.Credentials
}
}
- string INorthScaleClientConfiguration.Bucket
+ string IMembaseClientConfiguration.Bucket
{
get { return this.Servers.Bucket; }
}
- string INorthScaleClientConfiguration.BucketPassword
+ string IMembaseClientConfiguration.BucketPassword
{
get { return this.Servers.BucketPassword; }
}
- BucketPortType INorthScaleClientConfiguration.Port
+ BucketPortType IMembaseClientConfiguration.Port
{
get { return this.Servers.Port; }
}
2  Northscale.Store/Configuration/ServersElement.cs → Membase/Configuration/ServersElement.cs
View
@@ -1,7 +1,7 @@
using System.Configuration;
using System.ComponentModel;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
/// <summary>
/// Configures the <see cref="T:MemcachedClient"/>. This class cannot be inherited.
2  Northscale.Store/Configuration/UriElement.cs → Membase/Configuration/UriElement.cs
View
@@ -2,7 +2,7 @@
using System.ComponentModel;
using System.Configuration;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
/// <summary>
/// Represents a configuration element that contains a Memcached node address. This class cannot be inherited.
2  ...scale.Store/Configuration/UriElementCollection.cs → Membase/Configuration/UriElementCollection.cs
View
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Configuration;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
/// <summary>
/// Represents a collection of <see cref="T:EndPointElement"/> instances. This class cannot be inherited.
2  Northscale.Store/Configuration/UriValidator.cs → Membase/Configuration/UriValidator.cs
View
@@ -1,7 +1,7 @@
using System;
using System.Configuration;
-namespace NorthScale.Store.Configuration
+namespace Membase.Configuration
{
public sealed class UriValidatorAttribute : ConfigurationValidatorAttribute
{
2  Northscale.Store/Deserialization.cs → Membase/Deserialization.cs
View
@@ -3,7 +3,7 @@
using System.Collections.Generic;
using System.Net;
-namespace NorthScale.Store
+namespace Membase
{
#pragma warning disable 649
internal class ClusterConfig
16 Northscale.Store/Northscale.Store.csproj → Membase/Membase.csproj
View
@@ -8,8 +8,8 @@
<ProjectGuid>{708A2350-A26C-444D-B975-8164263951A7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Northscale.Store</RootNamespace>
- <AssemblyName>Northscale.Store</AssemblyName>
+ <RootNamespace>Membase</RootNamespace>
+ <AssemblyName>Membase</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
@@ -53,7 +53,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- <DocumentationFile>bin\Release\Northscale.Store.XML</DocumentationFile>
+ <DocumentationFile>bin\Release\Membase.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
@@ -88,17 +88,17 @@
<Compile Include="BucketConfigListener.cs" />
<Compile Include="ConfigHelper.cs" />
<Compile Include="Configuration\BucketPortType.cs" />
- <Compile Include="Configuration\INorthScaleClientConfiguration.cs" />
- <Compile Include="Configuration\NorthScaleClientConfiguration.cs" />
- <Compile Include="Configuration\NorthScaleClientSection.cs" />
+ <Compile Include="Configuration\IMembaseClientConfiguration.cs" />
+ <Compile Include="Configuration\MembaseClientConfiguration.cs" />
+ <Compile Include="Configuration\MembaseClientSection.cs" />
<Compile Include="Configuration\ServersElement.cs" />
<Compile Include="Configuration\UriElement.cs" />
<Compile Include="Configuration\UriElementCollection.cs" />
<Compile Include="Configuration\UriValidator.cs" />
<Compile Include="Deserialization.cs" />
<Compile Include="MessageStreamListener.cs" />
- <Compile Include="NorthScaleClient.cs" />
- <Compile Include="NorthScalePool.cs" />
+ <Compile Include="MembaseClient.cs" />
+ <Compile Include="MembasePool.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VBucketAwareOperationFactory.cs" />
<Compile Include="WebClientWithTimeout.cs">
42 Northscale.Store/NorthScaleClient.cs → Membase/MembaseClient.cs
View
@@ -3,63 +3,63 @@
using System.Configuration;
using Enyim.Caching;
using Enyim.Caching.Memcached;
-using NorthScale.Store.Configuration;
+using Membase.Configuration;
-namespace NorthScale.Store
+namespace Membase
{
/// <summary>
/// Client which can be used to connect to NothScale's Memcached and Membase servers.
/// </summary>
- public class NorthScaleClient : MemcachedClient
+ public class MembaseClient : MemcachedClient
{
- private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(NorthScaleClient));
- private static INorthScaleClientConfiguration DefaultConfig = (INorthScaleClientConfiguration)ConfigurationManager.GetSection("northscale");
+ private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(MembaseClient));
+ private static IMembaseClientConfiguration DefaultConfig = (IMembaseClientConfiguration)ConfigurationManager.GetSection("membase");
- private NorthScalePool nsPool;
+ private MembasePool nsPool;
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class using the default configuration and bucket.
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class using the default configuration and bucket.
/// </summary>
- /// <remarks>The configuration is taken from the /configuration/northscale section.</remarks>
- public NorthScaleClient() :
+ /// <remarks>The configuration is taken from the /configuration/membase section.</remarks>
+ public MembaseClient() :
this(DefaultConfig, null) { }
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class
/// using the default configuration and the specified bucket name.
/// </summary>
/// <param name="bucketName">The name of the bucket this client will connect to.</param>
- public NorthScaleClient(string bucketName) :
+ public MembaseClient(string bucketName) :
this(DefaultConfig, bucketName) { }
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class
/// using the specified configuration and bucket name.
/// </summary>
/// <param name="sectionName">The name of the configuration section to load.</param>
/// <param name="bucketName">The name of the bucket this client will connect to.</param>
- public NorthScaleClient(string sectionName, string bucketName) :
- this((INorthScaleClientConfiguration)ConfigurationManager.GetSection(sectionName), bucketName) { }
+ public MembaseClient(string sectionName, string bucketName) :
+ this((IMembaseClientConfiguration)ConfigurationManager.GetSection(sectionName), bucketName) { }
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class
/// using a custom configuration provider.
/// </summary>
/// <param name="configuration">The custom configuration provider.</param>
- public NorthScaleClient(INorthScaleClientConfiguration configuration) :
+ public MembaseClient(IMembaseClientConfiguration configuration) :
this(configuration, null)
{
- this.nsPool = (NorthScalePool)this.Pool;
+ this.nsPool = (MembasePool)this.Pool;
}
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class
/// using a custom configuration provider and the specified bucket name.
/// </summary>
/// <param name="configuration">The custom configuration provider.</param>
/// <param name="bucketName">The name of the bucket this client will connect to. Note: this will override the configuration's BucketName property.</param>
- public NorthScaleClient(INorthScaleClientConfiguration configuration, string bucketName) :
- base(new NorthScalePool(configuration, IsDefaultBucket(bucketName) ? null : bucketName),
+ public MembaseClient(IMembaseClientConfiguration configuration, string bucketName) :
+ base(new MembasePool(configuration, IsDefaultBucket(bucketName) ? null : bucketName),
configuration.CreateKeyTransformer(),
configuration.CreateTranscoder()) { }
@@ -164,7 +164,7 @@ private bool ExecuteWithRedirect(IMemcachedNode startNode, ISingleItemOperation
var iows = op as IOperationWithState;
// different op factory, we do not know how to retry
- if (iows == null)
+ if (iows == null)
return false;
#if HAS_FORWARD_MAP
27 Northscale.Store/NorthScalePool.cs → Membase/MembasePool.cs
View
@@ -1,24 +1,23 @@
using System;
using System.Collections.Generic;
-using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Threading;
-using Enyim.Caching.Memcached;
-using NorthScale.Store.Configuration;
using Enyim.Caching.Configuration;
+using Enyim.Caching.Memcached;
using Enyim.Caching.Memcached.Protocol.Binary;
+using Membase.Configuration;
-namespace NorthScale.Store
+namespace Membase
{
/// <summary>
- /// Socket pool using the NorthScale server's dynamic node list
+ /// Socket pool using the Membase server's dynamic node list
/// </summary>
- internal class NorthScalePool : IServerPool
+ internal class MembasePool : IServerPool
{
- private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(NorthScalePool));
+ private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(MembasePool));
- private INorthScaleClientConfiguration configuration;
+ private IMembaseClientConfiguration configuration;
private Uri[] poolUrls;
private BucketConfigListener configListener;
@@ -33,25 +32,25 @@ internal class NorthScalePool : IServerPool
private bool isTimerActive;
private long deadTimeoutMsec;
- public NorthScalePool(INorthScaleClientConfiguration configuration) : this(configuration, null) { }
+ public MembasePool(IMembaseClientConfiguration configuration) : this(configuration, null) { }
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class using the specified configuration
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class using the specified configuration
/// and bucket name. The name also will be used as the bucket password.
/// </summary>
/// <param name="configuration">The configuration to be used.</param>
/// <param name="bucket">The name of the bucket to connect to.</param>
- public NorthScalePool(INorthScaleClientConfiguration configuration, string bucket) : this(configuration, bucket, null) { }
+ public MembasePool(IMembaseClientConfiguration configuration, string bucket) : this(configuration, bucket, null) { }
/// <summary>
- /// Initializes a new instance of the <see cref="T:NorthScale.Store.NorthScalePool" /> class using the specified configuration,
+ /// Initializes a new instance of the <see cref="T:Membase.MembasePool" /> class using the specified configuration,
/// bucket name and password.
/// </summary>
/// <param name="configuration">The configuration to be used.</param>
/// <param name="bucket">The name of the bucket to connect to.</param>
/// <param name="bucketPassword">The password to the bucket.</param>
/// <remarks> If the password is null, the bucket name will be used. Set to String.Empty to use an empty password.</remarks>
- public NorthScalePool(INorthScaleClientConfiguration configuration, string bucket, string bucketPassword)
+ public MembasePool(IMembaseClientConfiguration configuration, string bucket, string bucketPassword)
{
this.configuration = configuration;
this.bucketName = bucket ?? configuration.Bucket;
@@ -68,7 +67,7 @@ public NorthScalePool(INorthScaleClientConfiguration configuration, string bucke
this.deadTimeoutMsec = (long)this.configuration.SocketPool.DeadTimeout.TotalMilliseconds;
}
- ~NorthScalePool()
+ ~MembasePool()
{
try { ((IDisposable)this).Dispose(); }
catch { }
2  Northscale.Store/MessageStreamListener.cs → Membase/MessageStreamListener.cs
View
@@ -6,7 +6,7 @@
using System.Text;
using System.Threading;
-namespace NorthScale.Store
+namespace Membase
{
/// <summary>
/// Listens on a streamingUri and processes the messages
4 Northscale.Store/Properties/AssemblyInfo.cs → Membase/Properties/AssemblyInfo.cs
View
@@ -1,8 +1,8 @@
using System.Reflection;
using System.Runtime.InteropServices;
-[assembly: AssemblyTitle("NorthScale.Store")]
-[assembly: AssemblyProduct("NorthScale.Store")]
+[assembly: AssemblyTitle("Membase")]
+[assembly: AssemblyProduct("Membase")]
[assembly: AssemblyCompany("enyim.com")]
[assembly: AssemblyCopyright("Copyright © enyim.com, Attila Kiskó 2010")]
2  Northscale.Store/VBucketAwareOperationFactory.cs → Membase/VBucketAwareOperationFactory.cs
View
@@ -7,7 +7,7 @@
using System.IO;
using System.Threading;
-namespace NorthScale.Store
+namespace Membase
{
/// <summary>
/// Membase requires each item operation to have a vbucket index set in the request's "reserved" field. (This is used for replicatiom and failover.) This op factory provides customized operations handling these indexes.
6 Northscale.Store/WebClientWithTimeout.cs → Membase/WebClientWithTimeout.cs
View
@@ -7,7 +7,7 @@
using System.Threading;
using System.Reflection;
-namespace NorthScale.Store
+namespace Membase
{
internal class WebClientWithTimeout : WebClient
{
@@ -16,7 +16,7 @@ internal class WebClientWithTimeout : WebClient
static WebClientWithTimeout()
{
var a = typeof(WebClientWithTimeout).Assembly;
- var ua = "NorthScale.Store";
+ var ua = "Membase";
// release builds have AssemblyFileVersion (generated by git decribe)
var af = Attribute.GetCustomAttribute(a, typeof(AssemblyFileVersionAttribute)) as AssemblyFileVersionAttribute;
@@ -41,7 +41,7 @@ public WebClientWithTimeout()
this.Encoding = Encoding.UTF8;
this.Headers[HttpRequestHeader.CacheControl] = "no-cache";
- this.Headers[HttpRequestHeader.Accept] = "application/com.northscale.store+json";
+ this.Headers[HttpRequestHeader.Accept] = "application/com.Membase+json";
this.Headers[HttpRequestHeader.UserAgent] = ClientUA;
}
33 MemcachedTest/103.config
View
@@ -18,8 +18,8 @@
<section name="textConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
<section name="binaryConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
- <section name="northscaleMemcached" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
- <section name="northscaleMembase" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="mbmcb" type="Membase.Configuration.MembaseClientSection, Membase" />
+ <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
</sectionGroup>
</configSections>
<enyim.com>
@@ -34,19 +34,19 @@
<test>
- <northscaleMembase>
+ <membase>
<servers userName="Administrator" password="11111111" bucket="content">
<add uri="http://192.168.2.200:8080/pools/default" />
<add uri="http://192.168.2.202:8080/pools/default" />
</servers>
- </northscaleMembase>
+ </membase>
- <northscaleMemcached>
+ <mbmcb>
<servers userName="Administrator" password="11111111" bucket="content">
<add uri="http://192.168.2.200:8080/pools/default" />
<add uri="http://192.168.2.202:8080/pools/default" />
</servers>
- </northscaleMemcached>
+ </mbmcb>
<!-- type vs factory test -->
@@ -79,10 +79,10 @@
<locator factory="Enyim.Caching.Memcached.VBucketNodeLocatorFactory, Enyim.Caching" hashAlgorithm="crc">
<data>
[
- [0, 1, 2],
- [1, 2, 0],
- [2, 1, -1],
- [1, 2, 0]
+ [0, 1, 2],
+ [1, 2, 0],
+ [2, 1, -1],
+ [1, 2, 0]
]
</data>
</locator>
@@ -140,12 +140,21 @@
</appender>
<root>
- <level value="Info" />
+ <level value="Debug" />
<appender-ref ref="TraceAppender" />
</root>
+ <logger name="Enyim.Caching.Memcached.PooledSocket">
+ <level value="Info" />
+ </logger>
+
+ <logger name="Enyim.Caching.Memcached.MemcachedNode.InternalPoolImpl">
+ <level value="Info" />
+ </logger>
+
<logger name="MemcachedTest">
<level value="Debug" />
- </logger> </log4net>
+ </logger>
+ </log4net>
</configuration>
48 MemcachedTest/App.config
View
@@ -18,15 +18,15 @@
<section name="textConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
<section name="binaryConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
- <section name="northscaleMemcached" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
- <section name="northscaleMembase" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="mbmcb" type="Membase.Configuration.MembaseClientSection, Membase" />
+ <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
</sectionGroup>
</configSections>
<enyim.com>
<memcached>
<servers>
- <add address="192.168.40.129" port="11211" />
- <add address="192.168.40.131" port="11211" />
+ <add address="192.168.2.200" port="11211" />
+ <add address="192.168.2.202" port="11211" />
</servers>
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" />
</memcached>
@@ -34,19 +34,19 @@
<test>
- <northscaleMembase>
- <servers userName="Administrator" password="11111111" bucket="membase">
- <add uri="http://192.168.40.129:8091/pools/default" />
- <add uri="http://192.168.40.131:8091/pools/default" />
+ <membase>
+ <servers userName="Administrator" password="11111111" bucket="content">
+ <add uri="http://192.168.2.200:8080/pools/default" />
+ <add uri="http://192.168.2.202:8080/pools/default" />
</servers>
- </northscaleMembase>
+ </membase>
- <northscaleMemcached>
- <servers userName="Administrator" password="11111111" bucket="mc_pass">
- <add uri="http://192.168.40.129:8091/pools/default" />
- <add uri="http://192.168.40.131:8091/pools/default" />
+ <mbmcb>
+ <servers bucket="content">
+ <add uri="http://192.168.2.200:8080/pools/default" />
+ <add uri="http://192.168.2.202:8080/pools/default" />
</servers>
- </northscaleMemcached>
+ </mbmcb>
<!-- type vs factory test -->
@@ -79,10 +79,10 @@
<locator factory="Enyim.Caching.Memcached.VBucketNodeLocatorFactory, Enyim.Caching" hashAlgorithm="crc">
<data>
[
- [0, 1, 2],
- [1, 2, 0],
- [2, 1, -1],
- [1, 2, 0]
+ [0, 1, 2],
+ [1, 2, 0],
+ [2, 1, -1],
+ [1, 2, 0]
]
</data>
</locator>
@@ -90,16 +90,16 @@
<binaryConfig protocol="Binary">
<servers>
- <add address="192.168.40.129" port="11211" />
- <add address="192.168.40.131" port="11211" />
+ <add address="192.168.2.200" port="11211" />
+ <add address="192.168.2.202" port="11211" />
</servers>
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" />
</binaryConfig>
<textConfig protocol="Text">
<servers>
- <add address="192.168.40.129" port="11211" />
- <add address="192.168.40.131" port="11211" />
+ <add address="192.168.2.200" port="11211" />
+ <add address="192.168.2.202" port="11211" />
</servers>
<socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:00:10" />
</textConfig>
@@ -151,6 +151,10 @@
<logger name="Enyim.Caching.Memcached.MemcachedNode.InternalPoolImpl">
<level value="Info" />
</logger>
+
+ <logger name="MemcachedTest">
+ <level value="Debug" />
+ </logger>
</log4net>
</configuration>
2  MemcachedTest/NorthScaleMembaseClientTest.cs → MemcachedTest/MembaseClientTest.cs
View
@@ -12,7 +12,7 @@ public class NorthScaleMembaseClientTest : BinaryMemcachedClientTest
{
protected override MemcachedClient GetClient()
{
- var client = new NorthScale.Store.NorthScaleClient("test/northscaleMembase", null);
+ var client = new Membase.MembaseClient("test/membase", null);
client.FlushAll();
return client;
4 MemcachedTest/NorthScaleMemcachedClientTest.cs → MemcachedTest/MembaseMemcachedBucketTest.cs
View
@@ -8,11 +8,11 @@ namespace MemcachedTest
///to contain all Enyim.Caching.MemcachedClient Unit Tests
///</summary>
[TestFixture]
- public class NorthScaleMemcachedClientTest : BinaryMemcachedClientTest
+ public class MembaseMemcachedBucketTest : BinaryMemcachedClientTest
{
protected override MemcachedClient GetClient()
{
- var client = new NorthScale.Store.NorthScaleClient("test/northscaleMemcached", null);
+ var client = new Membase.MembaseClient("test/mbmcb", null);
client.FlushAll();
return client;
7 MemcachedTest/MemcachedTest.csproj
View
@@ -65,7 +65,8 @@
<ItemGroup>
<Compile Include="BinaryMemcachedClientTest.cs" />
<Compile Include="ConfigTest.cs" />
- <Compile Include="NorthScaleMemcachedClientTest.cs" />
+ <Compile Include="MembaseClientTest.cs" />
+ <Compile Include="MembaseMemcachedBucketTest.cs" />
<Compile Include="KetamaTest.cs" />
<Compile Include="TextMemcachedClientTest.cs" />
<Compile Include="MemcachedClientTest.cs" />
@@ -77,9 +78,9 @@
<Project>{D438C0B3-A168-40B8-BDDD-61F0939DFF35}</Project>
<Name>Enyim.Caching</Name>
</ProjectReference>
- <ProjectReference Include="..\Northscale.Store\NorthScale.Store.csproj">
+ <ProjectReference Include="..\Membase\Membase.csproj">
<Project>{708A2350-A26C-444D-B975-8164263951A7}</Project>
- <Name>NorthScale.Store</Name>
+ <Name>Membase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
12 MemcachedTest/b4.config
View
@@ -18,8 +18,8 @@
<section name="textConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
<section name="binaryConfig" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
- <section name="northscaleMemcached" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
- <section name="northscaleMembase" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="mbmcb" type="Membase.Configuration.MembaseClientSection, Membase" />
+ <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
</sectionGroup>
</configSections>
<enyim.com>
@@ -34,19 +34,19 @@
<test>
- <northscaleMembase>
+ <membase>
<servers userName="Administrator" password="11111111" bucket="membase">
<add uri="http://192.168.40.129:8091/pools/default" />
<add uri="http://192.168.40.131:8091/pools/default" />
</servers>
- </northscaleMembase>
+ </membase>
- <northscaleMemcached>
+ <mbmcb>
<servers userName="Administrator" password="11111111" bucket="mc_pass">
<add uri="http://192.168.40.129:8091/pools/default" />
<add uri="http://192.168.40.131:8091/pools/default" />
</servers>
- </northscaleMemcached>
+ </mbmcb>
<!-- type vs factory test -->
2  README.mdown
View
@@ -1,6 +1,6 @@
# Enyim Memcached Client
-This is a .NET client library for [memcached](http://memcached.org) written in C#. Also it has a special client for [NorthScale](http://northscale.com)'s Memcached and Membase servers.
+This is a .NET client library for [memcached](http://memcached.org) written in C#. Also it has a special client for [Membase](http://membase.com)'s persistent memcached server.
Features:
11 TestApp/App.config
View
@@ -6,8 +6,8 @@
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
</sectionGroup>
<section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
- <section name="northscale" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
- <section name="membase" type="NorthScale.Store.Configuration.NorthScaleClientSection, NorthScale.Store" />
+ <section name="northscale" type="Membase.Configuration.MembaseClientSection, Membase" />
+ <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
</configSections>
<northscale>
@@ -49,16 +49,19 @@
</layout>
</appender>
<root>
- <level value="Debug" />
+ <level value="Info" />
<appender-ref ref="TraceAppender" />
</root>
+ <logger name="Enyim.Caching.Memcached.DefaultNodeLocator">
+ <level value="Debug" />
+ </logger>
<logger name="Enyim.Caching.Memcached.PooledSocket">
<level value="Info" />
</logger>
<logger name="Enyim.Caching.Memcached.Protocol">
<level value="Info" />
</logger>
- <logger name="NorthScale.Store.VBucketAwareOperationFactory">
+ <logger name="Membase.VBucketAwareOperationFactory">
<level value="Info" />
</logger>
<logger name="Enyim.Caching.Memcached.MemcachedNode">
41 TestApp/Program.cs
View
@@ -5,8 +5,8 @@
using Enyim.Caching.Memcached;
using System.Net;
using Enyim.Caching.Configuration;
-using NorthScale.Store;
-using NorthScale.Store.Configuration;
+using Membase;
+using Membase.Configuration;
using System.Threading;
namespace DemoApp
@@ -17,24 +17,9 @@ static void Main(string[] args)
{
log4net.Config.XmlConfigurator.Configure();
- // or just initialize the client from code
- var nscc = new NorthScaleClientConfiguration();
-
- nscc.SocketPool.ReceiveTimeout = new TimeSpan(0, 0, 2);
- nscc.SocketPool.DeadTimeout = new TimeSpan(0, 0, 10);
-
- nscc.Urls.Add(new Uri("http://192.168.2.210:8080/pools/default"));
- nscc.Urls.Add(new Uri("http://192.168.2.212:8080/pools/default"));
- nscc.Credentials = new NetworkCredential("A", "11111111");
- //nscc.BucketPassword = "pass";
-
- StressTest(new NorthScaleClient(nscc, "default"));
-
- return;
-
var mcc = new MemcachedClientConfiguration();
mcc.AddServer("192.168.2.200:11211");
- //mcc.AddServer("192.168.2.202:11211");
+ mcc.AddServer("192.168.2.202:11211");
mcc.SocketPool.ReceiveTimeout = new TimeSpan(0, 0, 4);
mcc.SocketPool.ConnectionTimeout = new TimeSpan(0, 0, 4);
@@ -44,13 +29,29 @@ static void Main(string[] args)
return;
- var nc = new NorthScaleClient(nscc, "content");
+
+ // or just initialize the client from code
+ var nscc = new MembaseClientConfiguration();
+
+ nscc.SocketPool.ReceiveTimeout = new TimeSpan(0, 0, 2);
+ nscc.SocketPool.DeadTimeout = new TimeSpan(0, 0, 10);
+
+ nscc.Urls.Add(new Uri("http://192.168.2.200:8080/pools/default"));
+ nscc.Urls.Add(new Uri("http://192.168.2.202:8080/pools/default"));
+ //nscc.Credentials = new NetworkCredential("A", "11111111");
+ //nscc.BucketPassword = "pass";
+
+ StressTest(new MembaseClient(nscc, "default"));
+
+ return;
+
+ var nc = new MembaseClient(nscc, "content");
var stats1 = nc.Stats("slabs");
foreach (var kvp in stats1.GetRaw("curr_connections"))
Console.WriteLine("{0} -> {1}", kvp.Key, kvp.Value);
- var nc2 = new NorthScaleClient(nscc, "content");
+ var nc2 = new MembaseClient(nscc, "content");
var stats2 = nc2.Stats();
foreach (var kvp in stats2.GetRaw("curr_connections"))
4 TestApp/TestApp.csproj
View
@@ -86,9 +86,9 @@
<Project>{D438C0B3-A168-40B8-BDDD-61F0939DFF35}</Project>
<Name>Enyim.Caching</Name>
</ProjectReference>
- <ProjectReference Include="..\Northscale.Store\Northscale.Store.csproj">
+ <ProjectReference Include="..\Membase\Membase.csproj">
<Project>{708A2350-A26C-444D-B975-8164263951A7}</Project>
- <Name>Northscale.Store</Name>
+ <Name>Membase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
18 build-release.msbuild
View
@@ -20,39 +20,39 @@
</UsingTask>
<Target Name="BeforeBuild">
- <RemoveDir Directories="Enyim.Caching\bin;Enyim.Caching\obj;NorthScale.Store\bin;NorthScale.Store\obj" ContinueOnError="true" />
+ <RemoveDir Directories="Enyim.Caching\bin;Enyim.Caching\obj;Membase\bin;Membase\obj" ContinueOnError="true" />
</Target>
<Target Name="Compile" DependsOnTargets="BeforeBuild">
<MSBuild Projects="Enyim.Caching\Enyim.Caching.csproj" Targets="Rebuild" Properties="Configuration=Release;IsReleaseBuild=true" />
- <MSBuild Projects="NorthScale.Store\NorthScale.Store.csproj" Targets="Rebuild" Properties="Configuration=Release;IsReleaseBuild=true" />
+ <MSBuild Projects="Membase\Membase.csproj" Targets="Rebuild" Properties="Configuration=Release;IsReleaseBuild=true" />
</Target>
<Target Name="PrepareFiles">
<Move SourceFiles="Enyim.Caching\bin\Release\Enyim.Caching.dll.config" DestinationFiles="Enyim.Caching\bin\Release\Demo.config" />
- <Move SourceFiles="NorthScale.Store\bin\Release\NorthScale.Store.dll.config" DestinationFiles="NorthScale.Store\bin\Release\Demo.config" />
+ <Move SourceFiles="Membase\bin\Release\Membase.dll.config" DestinationFiles="Membase\bin\Release\Demo.config" />
<Copy SourceFiles="LICENSE" DestinationFolder="Enyim.Caching\bin\Release\" />
- <Copy SourceFiles="LICENSE" DestinationFolder="NorthScale.Store\bin\Release\" />
+ <Copy SourceFiles="LICENSE" DestinationFolder="Membase\bin\Release\" />
</Target>
<Target Name="Pack">
<GetFileVersion AssemblyPath="Enyim.Caching\bin\Release\Enyim.Caching.dll">
<Output TaskParameter="FileVersion" PropertyName="EnyimCachingVersion" />
</GetFileVersion>
- <GetFileVersion AssemblyPath="NorthScale.Store\bin\Release\NorthScale.Store.dll">
- <Output TaskParameter="FileVersion" PropertyName="NorthScaleStoreVersion" />
+ <GetFileVersion AssemblyPath="Membase\bin\Release\Membase.dll">
+ <Output TaskParameter="FileVersion" PropertyName="MembaseVersion" />
</GetFileVersion>
<CreateItem Include="Enyim.Caching\bin\Release\**\*.*">
<Output ItemName="EnyimItems" TaskParameter="Include" />
</CreateItem>
- <CreateItem Include="NorthScale.Store\bin\Release\**\*.*">
- <Output ItemName="NorthScaleItems" TaskParameter="Include" />
+ <CreateItem Include="Membase\bin\Release\**\*.*">
+ <Output ItemName="MembaseItems" TaskParameter="Include" />
</CreateItem>
<Zip Files="@(EnyimItems)" ZipFileName="Enyim.Caching.$([System.Text.RegularExpressions.Regex]::Replace($(EnyimCachingVersion), `^([^0-9]+)`, ``)).zip" ZipLevel="9" Flatten="true" />
- <Zip Files="@(NorthScaleItems)" ZipFileName="NorthScale.Store.$([System.Text.RegularExpressions.Regex]::Replace($(NorthScaleStoreVersion), `^([^0-9]+)`, ``)).zip" ZipLevel="9" Flatten="true" />
+ <Zip Files="@(MembaseItems)" ZipFileName="Membase.$([System.Text.RegularExpressions.Regex]::Replace($(MembaseVersion), `^([^0-9]+)`, ``)).zip" ZipLevel="9" Flatten="true" />
</Target>
<Target Name="Build" DependsOnTargets="Compile;PrepareFiles;Pack">
Please sign in to comment.
Something went wrong with that request. Please try again.