Commit Graph
2896 Commits
Author SHA1 Message Date
Adam Heath 56ae98f437 Make use of UtilCache.findCache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585801 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:41:30 +00:00
Adam Heath 5d2226ca82 Switch to local LRUMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585798 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:38:37 +00:00
Adam Heath d658971b5e Remove use of ArrayList/HashMap, and use FastList/FastMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585794 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:28:37 +00:00
Adam Heath 60df320b48 Use LinkedHashMap instead of LinkedMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585793 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:25:10 +00:00
Adam Heath 62e2816cec Switch AbstractEntityConditionCache to FastMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585792 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:23:39 +00:00
Adam Heath 08a33982fa Switch connection classes to FastMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585790 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:22:03 +00:00
Adam Heath 7b092d4ec3 ByteWrapper now implements Comparable, hashCode, and equals().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585789 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:19:59 +00:00
Adam Heath 5048936900 Switch to collections class, from Vector/Hashtable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585788 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:18:34 +00:00
Adam Heath 686210a51b Fix loc incrementing in OfbizStore.keys().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585786 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:15:59 +00:00
Adam Heath 70b72b96a9 Use System.currentTimeMillis() instead of new Date.getTime().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585784 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:13:02 +00:00
Adam Heath d9732f5d00 While tracking down memory usage(using java 1.6 and jhat), I noticed
a significant amount being referenced from the xml definition files.
Interning the strings that are found reduced this usage noticably.
Each string found in an xml file ends up sharing the original array
from the incoming buffer, so more than is nescessary is held in
memory.
Additionally, several strings(for example, partyId) are referenced
several times.  Interning them reduces the memory even further.

Closes https://issues.apache.org/jira/browse/OFBIZ-1291


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585761 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 00:02:59 +00:00
Adam Heath e1597de161 Lots of entities have a single field as their primary key. Add some
find variants that allow for specifying just the value for database
lookup.  Closes https://issues.apache.org/jira/browse/OFBIZ-1292


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585759 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 23:51:41 +00:00
Adam Heath 753fc161b2 One little changed got merged incorrectly, for generics support.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585758 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 23:39:42 +00:00
Adam Heath 21e6eb59ad Java 1.5 markup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585752 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 23:19:44 +00:00
Adam Heath 444d041fdf Java 1.5 markup. Closes https://issues.apache.org/jira/browse/OFBIZ-1342
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585750 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 23:15:38 +00:00
Adam Heath 7b3a2a6b41 Java 1.5 markup for ComponentLoaderConfig.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585733 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 22:13:13 +00:00
Adam Heath 13580471ed Java 1.5 markup for FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585730 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 22:11:30 +00:00
Adam Heath df5cdede2a Java 1.5 markup for UtilProperties(fixes InvoiceServices too).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585729 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 22:08:42 +00:00
Adam Heath f3102e9053 Java 1.5 markup for FreeMarkerWorker.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585723 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:58:34 +00:00
Adam Heath ea614d5985 Java 1.5 markup for config and containers. Closes
https://issues.apache.org/jira/browse/OFBIZ-1335


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585720 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:56:36 +00:00
Adam Heath 309c2ee642 Java 1.5 markup for UtilMisc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585719 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:54:51 +00:00
Adam Heath c12614388c Remove ArrayList and HashMap usage from FreeMarkerWorker.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585718 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:52:21 +00:00
Adam Heath b29e01ddb7 Make these config classes final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585716 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:48:40 +00:00
Adam Heath cf8fc6582c Add java 1.5 generics and enhanced-for syntax. Closes
https://issues.apache.org/jira/browse/OFBIZ-1330


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585715 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 21:45:37 +00:00
Adam Heath 6ccbf6362f Add UtilMisc.toSetArray, to mirror toListArray.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585697 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:58:05 +00:00
Adam Heath 46f7da9f56 Add utility methods that create writable copies of maps, lists, and
sets.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585696 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:57:09 +00:00
Adam Heath 2ac99fe7ff Add some varargs variants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585695 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:53:50 +00:00
Adam Heath dac2c1bbc9 The java compiler in 1.5 and 1.6 is not as smart as it should be,
when it comes to inferring types for generics.  This class has
several helper methods, so that unnescessary warnings are only
issued for this file, and not every other file in the respository.
Once javac becomes smarter, than this class can be removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585690 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:51:21 +00:00
Adam Heath 401b4db0be Fix CCE in equals.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585686 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:46:20 +00:00
Adam Heath 2fcefefb8c More java 1.5 markup added for another set of base classes. Closes
https://issues.apache.org/jira/browse/OFBIZ-1341


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585683 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:44:11 +00:00
Adam Heath cc20789187 Java 1.5 feature usage; generics, enhanced-for, etc. Closes
https://issues.apache.org/jira/browse/OFBIZ-1331


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585681 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:41:01 +00:00
Adam Heath abd5c3b0d6 Used LinkedHashMap/LinkedHashSet, from collections 1.2, instead of
using local variants.  Deprecated OrderedMap/OrderedSet.  The filed
patch removed them, but that might break downstream code, so I'll
leave them in for now.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1324


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585679 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:37:37 +00:00
Adam Heath f15d2f41d8 Add java 1.5 generics and enhanced-for to all UtilCache classes.
Closes https://issues.apache.org/jira/browse/OFBIZ-1306


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585673 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:33:02 +00:00
Adam Heath 92ebed76ba Fix compile error in last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585671 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:29:21 +00:00
Adam Heath d448302bc8 Don't use ObjectType.NULL for the in-memory table.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585670 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:27:50 +00:00
Adam Heath f82f88ff25 Switch to the new LRUMap implementation. Closes
https://issues.apache.org/jira/browse/OFBIZ-1305


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585669 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:25:56 +00:00
Adam Heath 2e31efd216 A java 1.5 LRU map implementation. Closes
https://issues.apache.org/jira/browse/OFBIZ-1304


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585668 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:23:08 +00:00
Adam Heath 05b48902f1 Forgot to add these for version 585661.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585667 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:19:51 +00:00
Adam Heath be4bf7ad16 CacheLineTable does not implement map; as such, there's no need to
return Object.  It's better to have it return CacheLine.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1328


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585664 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:12:58 +00:00
Adam Heath ed0549624c Use sub-classes of CacheLine to manage hard/soft values. Closes
https://issues.apache.org/jira/browse/OFBIZ-1302


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585661 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:10:19 +00:00
Adam Heath bc6b4dc11a Switch all internal uses of StringBuffer over to StringBuilder; the
latter is unsynchronized, so is faster when there are no multi-
threaded concerns.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1329


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585658 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:07:09 +00:00
Adam Heath fec1c8be69 Switch some base classes to FastMap. Closes
https://issues.apache.org/jira/browse/OFBIZ-1333


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585657 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:04:00 +00:00
Adam Heath 1a76c84a76 Add helper method for finding UtilCaches by name. Closes
https://issues.apache.org/jira/browse/OFBIZ-1301


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585656 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:00:49 +00:00
Adam Heath fdd427b037 Use auto-boxing/unboxing for default indices. Closes
https://issues.apache.org/jira/browse/OFBIZ-1299


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585654 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:58:25 +00:00
Adam Heath fa24abccba Creating a new Integer/Long, checking against null, then getting the
underlying value is an odd way to parse a string into a number.  It's
better to just call parseInt/parseLong.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1300


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585653 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:56:32 +00:00
Adam Heath 78773e7215 The only public hasExpired method on UtilCache takes an Object; since
a CacheLine is passed, however, UtilCache never really finds the
correct value to check for expiration.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1296


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585650 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:54:32 +00:00
Adam Heath 9490ed60f8 Move the hasExpired logic into CacheLine. Closes
https://issues.apache.org/jira/browse/OFBIZ-1295


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585647 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:52:19 +00:00
Adam Heath 397ea18a52 In clearInitialContext(), there's no reason to call get, then remove;
just call remove directly.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1327


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585646 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:49:38 +00:00
Adam Heath 2a86a44888 Allow multiple files to be installed on the command line, by splitting
on comma.  Closes https://issues.apache.org/jira/browse/OFBIZ-1284


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585645 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:46:52 +00:00
Adam Heath 3eede5c55b Use FastMap/Map instead of Hashtable/Dictionary. Closes
https://issues.apache.org/jira/browse/OFBIZ-1326


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585644 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 19:43:55 +00:00