Commit Graph

37 Commits

Author SHA1 Message Date
Martin Stockhammer f101252375 Reorganizing imports 2018-03-30 20:11:57 +02:00
Martin Stockhammer bed24eac44 Finally switching the file lock to java.nio 2017-09-20 22:34:10 +02:00
olivier lamy 7a2710ec0a Merge branch 'feature/jcr_oak' 2017-08-19 21:37:35 +10:00
Daniel Trebbien 0b15664f1c Utilize parameterized logging and remove toString() calls
As suggested in the SLF4J FAQ:
https://www.slf4j.org/faq.html#logging_performance
.. parameterized logging can improve the efficiency of logger calls when
logging at the specified level is disabled.

In addition, per the FAQ: https://www.slf4j.org/faq.html#paramException
since SLF4J 1.6.0 it is possible to use parameterized logging and also
log an exception/throwable.

toString() is called automatically:
https://www.slf4j.org/faq.html#string_contents

These changes were suggested by SLF4J Helper for NetBeans IDE:
http://plugins.netbeans.org/plugin/72557/
2017-07-30 13:26:05 -07:00
olivier lamy 623eb062da shaded package changed
Signed-off-by: olivier lamy <olamy@apache.org>
2017-07-28 21:10:24 +10:00
Martin Stockhammer 878287b7b3 [MRM-1945] Fixing race condition
Do not return used locks anymore. If the lock map contains
an entry already, the retry loop continues.
2017-05-28 22:40:07 +02:00
Martin Stockhammer b0f22a2469 Fixing locking tests on windows 2017-04-16 22:17:16 +02:00
Martin Stockhammer 151fae7e17 Adding additional information for failing tests 2017-04-16 21:55:35 +02:00
Martin Stockhammer 367997a308 Add additional checks for file lock tests 2016-10-27 23:12:12 +02:00
Martin Stockhammer 5780110b79 Reverting locking modifications 2016-10-27 17:44:10 +02:00
Martin Stockhammer d380bc6779 Additional improvement for file locks 2016-10-27 12:22:56 +02:00
Martin Stockhammer 8dc5e696d2 Stabilised file lock implementation and tests 2016-10-26 23:33:09 +02:00
Olivier Lamy 9a09994c8c simply use File implementation as we are now 1.7 required 2014-04-22 12:02:32 +10:00
Olivier Lamy 65bcbc9d45 do the same as FileUtils.copyFile do 2014-04-16 19:48:53 +10:00
Olivier Lamy ec1e655c9d use Files.copy from java.nio.file 2014-04-16 18:11:38 +10:00
Eric Barboni 99117364be one move for all remaining override annotation 2014-04-11 23:46:35 +02:00
Olivier Lamy d6c28781b0 more diamond 2014-04-10 23:11:38 +10:00
Olivier Lamy 3e6c7ea831 ignore ClosedChannelException
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551831 13f79535-47bb-0310-9956-ffa450edef68
2013-12-18 04:04:38 +00:00
Olivier Lamy 66ed6cb4b0 prevent possible NPE
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551386 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 22:35:10 +00:00
Olivier Lamy 52caa0198b better handling of FNFE
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551370 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 22:01:19 +00:00
Olivier Lamy c2d4f8bce1 prevent possible file limit issue
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551121 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 06:53:09 +00:00
Olivier Lamy 4e077a844e prevent possible race condition if the file has been deleted
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1551109 13f79535-47bb-0310-9956-ffa450edef68
2013-12-16 03:35:55 +00:00
Olivier Lamy 3e91228d28 try creating the file before the lock
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550648 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 05:31:21 +00:00
Olivier Lamy a597458ba9 track FileNotFoundException if a concurrent thread delete the file before locking and try recreate it
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550647 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 05:31:13 +00:00
Olivier Lamy 76d1127f8b skip locking true per default
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550644 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 05:04:27 +00:00
Olivier Lamy e1c3663b01 use a concurrent map to handle file lock
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550641 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 04:47:36 +00:00
Olivier Lamy 49c91d619d add missing @since
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550638 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 04:46:54 +00:00
Olivier Lamy e48c05fb6f add note on possible improvments
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550637 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 04:46:45 +00:00
Olivier Lamy 06cb9ea4f9 [MRM-1702] use the fileLockLManager in the code with possible race condition
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550636 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 04:46:36 +00:00
Olivier Lamy c3ba717d4c expose how to skip locking mechanism
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550635 13f79535-47bb-0310-9956-ffa450edef68
2013-12-13 04:46:12 +00:00
Olivier Lamy 79329d262e fix timeout
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550562 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:37:34 +00:00
Olivier Lamy 7fc6fb2158 add class
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550561 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:37:24 +00:00
Olivier Lamy 3e344bc827 throw a timeout exception if not possible to get the lock after the timeout
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550560 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:37:16 +00:00
Olivier Lamy a724876adf license header
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550558 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:36:58 +00:00
Olivier Lamy 7f1ddf0b2f fix typo
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550557 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:36:48 +00:00
Olivier Lamy 875890880a cleanup this file locking library
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550556 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 22:36:40 +00:00
Olivier Lamy 6b23332e9d add a new module for file locking
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1550396 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 11:26:40 +00:00