camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1406952 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: Exchange.java component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
Date Thu, 08 Nov 2012 08:36:27 GMT
Author: ningjiang
Date: Thu Nov  8 08:36:27 2012
New Revision: 1406952

URL: http://svn.apache.org/viewvc?rev=1406952&view=rev
Log:
CAMEL-5776 Polished the exchange property name as Claus suggested

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=1406952&r1=1406951&r2=1406952&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Thu Nov  8 08:36:27
2012
@@ -120,7 +120,7 @@ public interface Exchange {
     String FILE_PARENT          = "CamelFileParent";
     String FILE_LAST_MODIFIED   = "CamelFileLastModified";
     String FILTER_MATCHED       = "CamelFilterMatched";
-    String FILE_LOCK_FILE_GOT   = "CamelFileLockFileGot"; 
+    String FILE_LOCK_FILE_ACQUIRED   = "CamelFileLockFileAcquired"; 
 
     String GROUPED_EXCHANGE = "CamelGroupedExchange";
     

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java?rev=1406952&r1=1406951&r2=1406952&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategy.java
Thu Nov  8 08:36:27 2012
@@ -52,7 +52,7 @@ public class MarkerFileExclusiveReadLock
         // create a plain file as marker filer for locking (do not use FileLock)
         File lock = new File(lockFileName);
         boolean acquired = lock.createNewFile();
-        exchange.setProperty(Exchange.FILE_LOCK_FILE_GOT, acquired);
+        exchange.setProperty(Exchange.FILE_LOCK_FILE_ACQUIRED, acquired);
 
         return acquired;
     }
@@ -62,7 +62,7 @@ public class MarkerFileExclusiveReadLock
         String lockFileName = getLockFileName(file);
         File lock = new File(lockFileName);
         // only release the file if camel get the lock before
-        if (exchange.getProperty(Exchange.FILE_LOCK_FILE_GOT, false, Boolean.class)) {
+        if (exchange.getProperty(Exchange.FILE_LOCK_FILE_ACQUIRED, false, Boolean.class))
{
             LOG.trace("Unlocking file: {}", lockFileName);
             boolean deleted = FileUtil.deleteFile(lock);
             LOG.trace("Lock file: {} was deleted: {}", lockFileName, deleted);



Mime
View raw message