lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [40/53] [abbrv] lucenenet git commit: Lucene.Net.Facet.Taxonomy.WriterCache refactor: Changed constants CharBlockArray.DefaultBlockSize > DEFAULT_BLOCK_SIZE, Cl2oTaxonomyWriterCache.LockTimeOut > LOCK_TIMEOUT
Date Wed, 08 Feb 2017 14:32:19 GMT
Lucene.Net.Facet.Taxonomy.WriterCache refactor: Changed constants CharBlockArray.DefaultBlockSize
> DEFAULT_BLOCK_SIZE, Cl2oTaxonomyWriterCache.LockTimeOut > LOCK_TIMEOUT


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/34075f29
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/34075f29
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/34075f29

Branch: refs/heads/api-work
Commit: 34075f29977ff9646c7a09d2cb9f3436604cebee
Parents: 883ad7f
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 8 13:09:56 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 8 21:08:24 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs  | 4 ++--
 .../Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs          | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/34075f29/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs
index e576223..821b4d3 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/CharBlockArray.cs
@@ -43,7 +43,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
     {
         private const long serialVersionUID = 1L;
 
-        private const int DefaultBlockSize = 32 * 1024; // 32 KB default size
+        private const int DEFAULT_BLOCK_SIZE = 32 * 1024; // 32 KB default size
 
 #if FEATURE_SERIALIZABLE
         [Serializable]
@@ -76,7 +76,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
         internal int length_Renamed;
 
         public CharBlockArray()
-            : this(DefaultBlockSize)
+            : this(DEFAULT_BLOCK_SIZE)
         {
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/34075f29/src/Lucene.Net.Facet/Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs
index ac522dc..19abe80 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/Cl2oTaxonomyWriterCache.cs
@@ -30,7 +30,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
     /// </summary>
     public class Cl2oTaxonomyWriterCache : ITaxonomyWriterCache
     {
-        private const int LockTimeOut = 1000;
+        private const int LOCK_TIMEOUT = 1000;
         private readonly ReaderWriterLockSlim @lock = new ReaderWriterLockSlim();
         private readonly int initialCapcity, numHashArrays;
         private readonly float loadFactor;
@@ -50,7 +50,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
 
         public virtual void Clear()
         {
-            if (@lock.TryEnterWriteLock(LockTimeOut))
+            if (@lock.TryEnterWriteLock(LOCK_TIMEOUT))
             {
                 try
                 {
@@ -86,7 +86,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
 
         public virtual int Get(FacetLabel categoryPath)
         {
-            if (@lock.TryEnterReadLock(LockTimeOut))
+            if (@lock.TryEnterReadLock(LOCK_TIMEOUT))
             {
                 try
                 {
@@ -106,7 +106,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
 
         public virtual bool Put(FacetLabel categoryPath, int ordinal)
         {
-            if (@lock.TryEnterWriteLock(LockTimeOut))
+            if (@lock.TryEnterWriteLock(LOCK_TIMEOUT))
             {
                 try
                 {


Mime
View raw message