Commit Graph
118 Commits
Author SHA1 Message Date
Rob AustinandRob Austin addfc1481f improvement to map (#266) and (#265)
* added AbstractClosable

* added Jvm.init()

* added disable.thread.safety

* ignore thread safety check

* disabled threadSafetyCheck for chronicle map

* removed init()

* changed isOpen() to be !isClosed()

* throwExceptionIfClosed() now creates a new ChronicleHashClosedException()

* added  test testRemainingAutoResizesAfterClose

Co-authored-by: Rob Austin <rob.austin@boundedbuffer.co.uk>
2021-01-27 18:23:07 +00:00
Per Minborg 49b58862b9 Prevent arithmetic operations from overflowing, Fix #244 2020-12-10 17:38:14 +01:00
Peter Lawrwy 9dc2b9130f Sync 2020-11-10 15:02:44 +00:00
Peter Lawrey 83e04bce22 Tidy code 2020-11-02 10:30:37 +00:00
Peter Lawrey a76f6b7e86 Remove redundant newlines 2020-10-29 15:51:01 +00:00
Peter Lawrey 3823ac1ee5 Avoid NPE in close 2020-10-15 16:49:27 +01:00
Per Minborg 36f03b4e4a Add file locking, work on #229 2020-09-02 17:40:18 +02:00
Per Minborg 5ace988277 Cleanup classes 2020-09-02 10:42:29 +02:00
Peter Lawrey 8dfc91b1eb Cody tidy and optimise the tracing code. 2020-06-18 13:17:58 +01:00
Peter Lawrey 0c5a5c8909 Add throwExceptionIfClosed(); to most public methods for classes implementing Closeable, https://github.com/OpenHFT/Chronicle-Core/issues/116 2020-06-15 16:17:07 +01:00
Peter Lawrey 071bcf1d8e Added support for dynamic discovery of files, https://github.com/OpenHFT/Chronicle-Core/issues/88 2019-08-28 17:59:17 +01:00
udaysagar2177 77b678184f be able to skip automatic closing of a hash resource 2019-06-12 19:11:29 -07:00
Peter Lawrey 1a36f1bbc6 Ensure the chunk size is a multiple of the alignment, closed https://github.com/OpenHFT/Chronicle-Map/issues/169 2019-05-09 12:28:04 +01:00
Rob Austin 075083455e corrected -> return (int) (sizeInBytes / chunkSize) + 1; 2018-11-15 21:27:46 +00:00
Rob Austin 2f6e9441d7 added a work around to address -> net.openhft.chronicle.map.MissSizedMapsTest 2018-11-15 18:45:27 +00:00
Dmitry Pisklov 89b0b6b163 Merge pull request #159 from udaysagar2177/fix2
add pre-shutdown action to be executed inside ChronicleHashCloseOnExitHook
2018-09-26 11:23:10 +01:00
udaysagar2177 9eed0e3265 add pre-shutdown action to be executed inside ChronicleHashCloseOnExitHook.
This is useful when we want to do an orderly shutdown.
For example: To carry out graceful shutdown and explicitly control when a ChronicleHash
is closed, a pre-shutdown action can be a wait on a CountDownLatch that would be released
appropriately.
2018-09-21 00:36:04 -07:00
Roman Leventov cf24d82ba2 Merge pull request #154 from Zor-X-L/fallocate
try to preallocate space after RandomAccessFile#setLength()
2018-09-14 18:38:05 +03:00
Dmitry Pisklov 1e1a086ea9 Change of license - update headers 2018-09-14 13:27:49 +01:00
Liu Xiao b6432ef796 use OS.isLinux() instead of Platform.isLinux() for consistency 2018-07-02 09:12:01 +08:00
Liu Xiao e78677120b code refactoring 2018-07-02 09:00:34 +08:00
Liu Xiao 89a35a108e try to preallocate space after RandomAccessFile#setLength() 2018-06-29 09:10:47 +08:00
Paweł Dąbrowski f2064f4db4 re OpenHFT/Chronicle-Map#134 Reflection based access to Cleaner compatible with 8 and 9+ JDKs. 2018-04-23 17:33:43 +02:00
Peter Lawrey e7c7dd8975 Code tidy after code inspections 2018-04-21 17:41:31 +01:00
Peter Lawrey 9323cf28a7 Standard code formatting 2018-04-21 10:49:49 +01:00
Rob Austin 93a642054e updated the bom to the latest map 2017-11-17 15:01:31 +00:00
leventov 3e903775f9 Revert method and field reordering 2017-06-04 12:33:41 -05:00
Peter Lawrey ed8361b5cf Add a fix for enums being written as marshallables. 2017-06-04 14:01:48 +01:00
leventov 7f3cca96d2 Add ChronicleHashCorruption listening interface, and Beta annotation 2017-02-26 21:02:34 -06:00
leventov 842064dca5 Clean serializers and ThreadLocal fields of VanillaChronicleMap on close() 2016-12-27 15:50:24 +08:00
leventov fa70e216bd Improvements to ChronicleMap resource closing subsystem, making it more robust in exotic scenarios (OutOfMemoryError, StackOverflowError) and be able to close after incorrect attempt to close when a context is open in the same thread 2016-12-26 14:27:32 +08:00
leventov dad7313bf4 Remove unused VanillaChronicleHash.doClose() 2016-12-11 17:02:24 -06:00
leventov e0b534af23 Move all ChronicleMap closing logic into independent ChronicleHashResources. Reference contexts from ThreadLocals via ContextHolders and clear references to contexts on closing ChronicleMap. Make some closing procedures more paranoid than they were. Cache ChronicleMap's identityString and always return the same String from toIdentityString(). Add Throwables.returnOrSuppress(). 2016-12-10 21:03:20 -06:00
leventov 9e88392db6 Rename ChronicleHashResourceReleaser to ChronicleHashResources 2016-12-10 21:03:20 -06:00
leventov 37d82f290a Review Exception throwing and handling throughtput the library, create specific InterProcessDeadLockException for Chronicle Map deadlocks 2016-11-19 19:14:53 -06:00
leventov d76f838adb Add ability to configure name for all ChronicleMaps and ChronicleSets via ChronicleHashBuilder.name(). Add ChronicleHash.toIdentityString() 2016-11-12 15:43:27 -06:00
leventov e7b2836e2a Impove comments in VanillaChronicleHash 2016-11-05 17:23:48 -06:00
leventov 406bd59848 Remove VanillaChronicleHash from OnExitHook on close() 2016-11-05 17:19:07 -06:00
leventov 9723fcd689 Do VanillaChronicleHash.msync() only when ChronicleHash is persisted 2016-11-05 15:08:54 -06:00
leventov 9a2bb31b66 Add ChronicleHash.offHeapMemoryUsed() method; Centralized management of all direct memory and file resources of ChronicleMap in one Cleaner 2016-11-05 15:08:45 -06:00
leventov a2c8ac4866 Try to close alive ChronicleMaps on JVM shutdown 2016-10-02 18:42:39 +03:00
leventov b4258fa263 Don't use synrhonized on a public object (the map itself) in ReplicatedChronicleMap.close() 2016-10-01 20:33:16 +03:00
leventov ba8227ade1 Use more specific ChronicleHashClosedException instead of IllegalStateException, when methods of ChronicleHash are called after hash.close(). Actualize ChronicleHash.close() javadoc. 2016-08-05 23:22:51 +07:00
leventov f9edc314bb Optimize VanillaChronicleMap.longSize(): don't acquire and close context for each segment, and make it atomic against concurrent map.close() 2016-08-05 23:20:50 +07:00
leventov 4bcdcdb8ce Update license information 2016-07-22 15:05:04 +07:00
leventov 7ada09a8dc Make VanillaChronicleHash.close() to wait until concurrent threads accessing the hash finish their work and don't permit new threads to come while close() is in progress and after that 2016-07-17 23:25:49 +07:00
leventov ed4589a1f4 Removed unused code from VanillaChronicleHash.basicRecover() method 2016-02-24 16:44:36 +07:00
leventov 05ccde9671 Add dataStoreSize field to Chronicle Map's global mutable state 2016-02-13 21:27:30 +07:00
leventov 6b030ab44e Refactor VanillaChronicleHash.allocateTier() method 2016-02-10 22:59:38 +07:00
leventov d7ed5b0153 Simplify parameter flow on VanillaChronicleHash initialization 2016-02-09 15:03:34 +07:00