Adam Heath
ca93e370fc
In setLru, if memoryTable is a ConcurrentLinkedHashMap, then just call
...
setCapacity on it, which will cause the oldest entries to be removed
when the size is lowered.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929821 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:36:03 +00:00
Adam Heath
e5b8e12d8a
No longer use LRUMap, but a non-blocking variant,
...
ConcurrentLinkedHashMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929820 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:35:31 +00:00
Adam Heath
204dc4e8f7
Create the memoryTable during the constructor, instead of calling
...
setLru. This removes a null check in the latter method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929819 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:34:49 +00:00
Adam Heath
a5c9f50d5a
In setLru, it's not nescessary to check memoryTable against null.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929818 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:34:17 +00:00
Adam Heath
59cc3972ec
Refactored null handling, so that isNullSet and nullValue are no longer
...
required.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929817 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:33:45 +00:00
Adam Heath
bff9d9e655
Don't prefix jdbmMgr access with CacheLineTable classname.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929816 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:33:13 +00:00
Adam Heath
d02a6bc2ff
When removing a key, and calling fileTable.remove, be certain to call
...
jdbmMgr.commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929815 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:32:40 +00:00
Adam Heath
b7acc2eb21
getMaxSize didn't actually do anything useful, and overlapped with
...
getMaxInMemory. Deprecate getMaxSize(it continues to call setLru
underneath everything), and provide a new getSizeLimit method. This
latter method still does nothing, but at least it no longer overlaps.
Also remove the maxSize parameter in webtools FindUtilCache page,
instead displaying and altering the maxInMemory setting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929813 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:31:37 +00:00
Adam Heath
a092e05bf7
values() shouldn't call get(), as it records a hit count.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929812 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:30:38 +00:00
Adam Heath
cad4022b33
Make use of the new generics support in jdbm.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929811 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:30:02 +00:00
Adam Heath
548da39c81
Upgrade jdbm to a snapshop from svn, version 38; this new version
...
finally supports generics markup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929809 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:26:40 +00:00
Adam Heath
657da93f8c
Import jdbm classes instead of referencing them directly.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929808 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:25:52 +00:00
Adam Heath
796c464be5
utilCacheTable is a ConcurrentHashMap, which means the values can be
...
iterated directly, instead of making a copy.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929807 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:25:15 +00:00
Adam Heath
778e079437
Remove default values from cache.properties. Since the default setting
...
in the file was to set soft reference to false, if some code explicitly
called create, requesting soft reference, it would be overridden by the
setting in the file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929806 13f79535-47bb-0310-9956-ffa450edef68
2010-04-01 04:24:28 +00:00
Adam Heath
eb3cfad398
Refactor testBasicDisk and testSimple.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929399 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:11:04 +00:00
Adam Heath
3e2eaaa4f4
Fetching null key from disk when it doesn't already exist in memory was
...
broken, because the key wasn't protected with ObjectType.NULL.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929398 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:10:14 +00:00
Adam Heath
08b3441578
Add tests for the file store feature.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929396 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:09:14 +00:00
Adam Heath
08a7366497
Don't attempt to reload an existing cache from disk.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929395 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:08:35 +00:00
Adam Heath
94f3f520b9
Prefix the fileStore path with ofbiz.home.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929393 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:07:48 +00:00
Adam Heath
8f74e23e50
Start UtilCache tests.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929392 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:05:05 +00:00
Adam Heath
1a802df86a
Helper method to force an OutOfMemory error to occur.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929391 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:04:13 +00:00
Adam Heath
b09015e841
Add getMaxInMemory method to expose the internal variable.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929390 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:03:41 +00:00
Adam Heath
2189889f33
Change return type of getMaxSize to int, to match the internal variable.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929389 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 06:02:59 +00:00
Adam Heath
906e234286
Use accessor methods consistently.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929388 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 05:55:37 +00:00
Adam Heath
7af0756b2f
Fix needless use of ().
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929387 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 05:55:03 +00:00
Adam Heath
fcd1be6419
Add testing for ComparableRange.compareTo(not done).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929386 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 05:54:28 +00:00
Adam Heath
88849d4ed9
Turn off heavy axis debug logging.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929385 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 05:53:49 +00:00
Adam Heath
c5ea13344b
Rename SourceMonitor to SourceMonitored, and remove all the settings.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@929384 13f79535-47bb-0310-9956-ffa450edef68
2010-03-31 05:52:58 +00:00
Jacques Le Roux
40924b4fc9
Fix a bug reported by Qin Sheng on user ML. This wrong C/P was introduced by r585750
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@928470 13f79535-47bb-0310-9956-ffa450edef68
2010-03-28 18:32:32 +00:00
Jacopo Cappellato
73bfcba796
I have forgotten to commit this in my previous commit (927783): now the ComparableRange class implements the Comparable interface.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927867 13f79535-47bb-0310-9956-ffa450edef68
2010-03-26 14:27:49 +00:00
Adrian Crum
19f2a0a463
Small fixups in GroovyUtil.java - no functional change. Removed unused import, fixed Generics warnings, reordered methods.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927503 13f79535-47bb-0310-9956-ffa450edef68
2010-03-25 17:10:57 +00:00
Adrian Crum
32e6c4317b
Simplified the getBinding method in GroovyUtil.java, plus added a JavaDoc to describe what it does.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@927172 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 20:22:38 +00:00
Adam Heath
bff0cbe2c5
ExecutionPool.pulseAll now requires a class filter.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926924 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:22:54 +00:00
Adam Heath
fefef6c4d8
Check for validity after converting, instead of before.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926923 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:22:12 +00:00
Adam Heath
8f84e88df1
Junit assertThat syntactic sugar.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926922 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:21:38 +00:00
Adam Heath
17631d27d3
Add constructor variant that allows for setting the loadTimeNanos.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926920 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:20:57 +00:00
Adam Heath
aa1481c254
Save the loadTimeNanos value.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926919 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:20:29 +00:00
Adam Heath
9879218402
Change delayMillis to delayNanos.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926918 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:20:01 +00:00
Adam Heath
a637cd1a90
Improve polish notation, by suffixing Nanos, and removing 'In' keyword.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926917 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:19:30 +00:00
Adam Heath
3869beaa98
Implement Serializable, so this can be saved to disk and other
...
locations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926916 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:19:03 +00:00
Adam Heath
9a89157c71
Implement hashCode, which is required when equals is implemented.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926915 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:18:35 +00:00
Adam Heath
dbc48e2b1e
Remove useless StringBuilder instantiation.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926914 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:18:07 +00:00
Adam Heath
3623c1c8df
Add new annotation, SourceMonitor, which provides a source-level
...
documention of which people, on which mailing list, will be giving extra
attention to changes to the annotated classes, constructors, and
methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926912 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 03:16:50 +00:00
Adam Heath
d06217cffb
Fix very slow startup times, by turning off excessive debugging. This
...
gave a 40% speedup in startup time on a production server.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926874 13f79535-47bb-0310-9956-ffa450edef68
2010-03-24 00:08:40 +00:00
Adrian Crum
c81c12d286
Added the ability for services to invoke Groovy script methods. Groovy service methods do not have parameters; parameters are passed in the context - just like simple method services.
...
Removed long comment (unused cache testing code) in GroovyUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@926780 13f79535-47bb-0310-9956-ffa450edef68
2010-03-23 21:05:56 +00:00
Scott Gray
6109808c8a
Tabs to spaces
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Adrian Crum
ece5529bd9
Fixed catch clause in ObjectType.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923592 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 06:46:17 +00:00
Adrian Crum
5aee9e3b82
Deleted orphaned JavaDoc comment.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923591 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 06:45:23 +00:00
Adam Heath
a98e688899
Move ObjectWrapper to the lang package.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923358 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:33:24 +00:00
Adam Heath
ac7090a129
This doesn't need to import ObjectWrapper.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923356 13f79535-47bb-0310-9956-ffa450edef68
2010-03-15 17:32:06 +00:00