Commit Graph

326 Commits

Author SHA1 Message Date
Michael Bayne 980be19918 Unused import pruning and other cleaning. 2008-11-25 20:14:09 +00:00
Michael Bayne 0b439978fb Stubbed out Depot support for HSQLDB. This also doesn't work yet but will some
day be made to work and enable more sophisticated unit testing of Depot and
systems that use Depot.
2008-11-25 20:13:43 +00:00
Michael Bayne bc44c4e58e A cache adapter for testing. 2008-11-25 00:57:22 +00:00
Michael Bayne 9e2dbeb174 Finished collection caching implementation. Our databases will shortly breath a
great sigh of relief.
2008-11-25 00:57:04 +00:00
Michael Bayne ae34697c8d KeySet is going to get stuffed into the cache, so we're making it more memory
efficient.

Also switched from Collection to Iterable in some internal spots where we don't
need anything other than an iterator. I wanted to push this all the way out to
DepotRepository but ran into some snags. I'm leaving in this change in case I
feel like desnaggling the external bits later.
2008-11-24 22:05:04 +00:00
Michael Bayne ae414006bc These don't *really* override anything so we can't mark them as such as JDK 1.5
will do le freak out.
2008-11-21 06:30:32 +00:00
Michael Bayne f6339978bf Missed a spot. 2008-11-21 06:11:57 +00:00
Michael Bayne 475200849c Extract query and record cache tracking into parent. 2008-11-21 03:19:44 +00:00
Michael Bayne e347f4ac17 More toString()ery. Changed KeyUtil to DepotUtil so I could jam some more
useful stuff in it.
2008-11-21 03:15:47 +00:00
Michael Bayne e98ad09588 If loadAll() can return its results entirely from the cache before invoke(),
have it do so. Down to the last couple of steps for collection caching.
2008-11-21 02:50:16 +00:00
Michael Bayne 22c086f64e Extracted findAllKeys() query into a helper class, made it possible for Query
to request a read-write connection.
2008-11-21 02:30:08 +00:00
Michael Bayne 3cf711e083 More toString()s. 2008-11-21 02:04:07 +00:00
Michael Bayne 9880ff326c A whole bunch of revampery on the way to collection caching, including some
basic stats reporting and query and cache logging.

PersistenceContext no longer sticks its nose so deeply into the business of
Query and Modifier. It just passes itself along and allows them to do any cache
activity they need during their normal execution. The one situation where we
keep our nose in their business is to allow a Query to return a result from the
cache before it is even invoked so that we can avoid requesting a database
connection if we won't ever need one.
2008-11-21 01:49:28 +00:00
Michael Bayne 5f26eb28c9 Fixed sed error. 2008-11-20 00:16:57 +00:00
Michael Bayne 22a3c138b7 We need our template files as well. 2008-11-20 00:13:21 +00:00
Michael Bayne c4eb78e0b8 Use the correct variable name. 2008-11-20 00:10:15 +00:00
Michael Bayne 566ebcf7f9 Only release the connection if we didn't report it as failed. 2008-11-17 21:55:02 +00:00
Michael Bayne 42aa622551 Added README and build target descriptions. 2008-11-17 19:10:33 +00:00
Michael Bayne ceafda9f83 We need google-collect.jar. 2008-11-17 18:47:46 +00:00
Michael Bayne 76aa7f2cef Tell Eclipse about our dependency on samskivert. 2008-11-17 18:43:30 +00:00
Michael Bayne bc30c2061c Some Eclipse bits. 2008-11-17 18:41:06 +00:00
Michael Bayne 1f86dbd9c4 Google Collectivised. 2008-11-16 18:31:25 +00:00
Michael Bayne 0fc1d68bbe Fixed up svn:keywords property. 2008-11-16 08:03:33 +00:00
Michael Bayne 9c0dbb5b47 Fixed up packages. 2008-11-16 08:01:19 +00:00
Michael Bayne c60181a484 We need a GWT module. 2008-11-16 07:53:22 +00:00
Michael Bayne 50053f5282 Oh boy, we have to build a GWT source jar file. 2008-11-16 07:34:30 +00:00
Michael Bayne 7a23a6bd49 Copy the tests over. I couldn't migrate these with the rest of the SVN
migration because svndumpfilter is a royal pain in my ass.
2008-11-16 07:30:20 +00:00
Michael Bayne 711fd44911 No longer needed. 2008-11-16 06:55:13 +00:00
Michael Bayne 601a15c00f Added snapshot target. 2008-11-16 06:49:09 +00:00
Michael Bayne b32b4eecc3 Updated the source headers and added the license file. 2008-11-16 06:17:45 +00:00
Michael Bayne b9604c2d56 Ignore the jar dependencies we keep in here. 2008-11-16 06:09:33 +00:00
Michael Bayne 40c1480039 More tidying, added Javadoc overview. 2008-11-16 06:08:56 +00:00
Michael Bayne 745c380e8d Repackage Depot as com.samskivert.depot as it is now a standalone library.
We're also going to allow ourselves the luxury of a Google Collections
dependency.
2008-11-16 05:59:28 +00:00
Michael Bayne 6959383b6c Unified Query and Modifier under Operation which cleans up some niggles in
PersistenceContext.
2008-11-13 23:35:12 +00:00
Par Winzell f653e59a66 That was broken code-in-progress and not meant to be commnitted. 2008-11-05 00:19:59 +00:00
Par Winzell 49391b1995 When we reinitialize the Throttle with a smaller number of allowed operations within a time period, we should preserve the oldest rather than the newest ones, or we'll most likely be in immediate and unfair violation of the limit. 2008-11-05 00:18:21 +00:00
Par Winzell bac0348951 Change these hard-coded defaults. Should also be made configurable. 2008-11-04 19:20:33 +00:00
Michael Bayne 05f499736e Nixed unused import, commented out others that go with commented out code. 2008-11-01 05:39:27 +00:00
Michael Bayne 8ec25c5a6d Make the 1.5 compiler happy. 2008-10-31 00:42:53 +00:00
Michael Bayne 2b8bc0c97f When we can switch entirely to 1.6 we can use Postgres's value = any(?::int[])
form to pass as many damned keys we want in a giant array. At that time we can
nix all the >32,768 key fiddly business.
2008-10-31 00:17:36 +00:00
Michael Bayne ec76d4d29f Oops, avoid introducing a bug when nulls == zeros == values.length. We want to
return null in that case.
2008-10-24 05:18:50 +00:00
Michael Bayne 2309c490f7 Compromise on our 0 == null stance for primary key columns. See the code
comments for further details.
2008-10-24 05:13:28 +00:00
Michael Bayne ba97743754 Make sure we use the up to date metadata when doing our stale column check. 2008-10-22 01:09:22 +00:00
Michael Bayne 19287550f4 More javadoc cleanup. 2008-09-30 00:23:57 +00:00
Michael Bayne 4c94296b67 Javadoc fixes. 2008-09-30 00:12:08 +00:00
Michael Bayne fee6be6c2d Added support for data migrations, which are run after all schema migrations
have been run and are also coordinated between disparate processes by an
in-database lock system.
2008-09-25 23:40:01 +00:00
Michael Bayne 2b21105dc1 Call EntityMigration SchemaMigration because that's what it's for and I want to
add a new DataMigration mechanism so that people can stop using schema
migrations to do data migration.
2008-09-25 22:27:58 +00:00
Michael Bayne 2c9c9b47c1 Let's preserve the ability for callers with uncomplicated needs to create and
initialize a persistence context in one fell swoop.
2008-09-24 19:09:17 +00:00
Michael Bayne 0e68c8a599 Change the way initialization is handled (a bit). It is now possible to create
a PersistenceContext and give it out to all of your repositories and delay
activating the context until you are ready for everyone to start talking to the
database. In this way you can enforce that no one does any database fooling
around before it's OK.

I also introduced DepotRepository.init() where database fooling around is OK.
The general idea is that you register schema migrations in your constructor and
then if you have data migrations to be done (or initialization that requires
reading things from the database), you do that in init().
2008-09-24 18:33:25 +00:00
Michael Bayne 81c25ae4f1 Properly handle int[] fields when encountered as unassociated values. We
already do the right thing when we process them as fields of persistent
records.
2008-09-23 17:18:23 +00:00