mdb
c20cea85dd
Allow the prune interval to be run on a particular RunQueue (invoker in this
...
case as the Invoker is now a RunQueue) instead of on its own interval thread.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2126 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-10 22:00:21 +00:00
mdb
85024c595b
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2125 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-10 21:59:32 +00:00
ray
03040c0258
Use a nice toString() for posted Runnables.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2124 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-09 20:38:44 +00:00
ray
d47927b749
Made the Invoker a RunQueue. Don't get confused!
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2123 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-09 20:20:47 +00:00
ray
1894f266a1
De-DOS'd these files, from Dave Hoover.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2122 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-06 00:16:21 +00:00
samskivert@gmail.com
803940faf0
Added parseBooleanArray method.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2121 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-05 19:07:13 +00:00
andrzej
977126b6df
Made IntIntMap serializable, added an isEmpty method.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2120 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-03 03:18:55 +00:00
ray
4d8d0f3788
From Charlie Groves:
...
- Added a version of getWeightedIndex() that takes a float[] the Random to
use for picking.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2119 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-29 00:32:12 +00:00
mdb
16753a8d0c
Check that our schema does not contain stale columns and issue a warning if it
...
does.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2118 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-29 00:25:40 +00:00
mdb
8490e3129f
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2116 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-18 23:14:26 +00:00
mdb
74675a7e57
Add a delete() that takes a Key.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2115 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-15 01:13:28 +00:00
mdb
c386d66109
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2114 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-13 17:09:41 +00:00
ray
138ce05fe8
Occam's razor.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2113 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-13 17:05:48 +00:00
mdb
b822e51753
Use the multi-head aware Graphics{Environment,Device,Configuration} to center
...
windows if possible as Toolkit isn't smart about such things.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2112 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-13 17:01:18 +00:00
mjohnson
2e31d2d2f8
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2111 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-12 22:30:48 +00:00
ray
4628bbc787
Indentation correction.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2110 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-05 01:43:25 +00:00
mdb
7932dbde0e
We need to initialize migrations here as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2109 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-02 00:07:41 +00:00
mdb
9c8f59ee25
Patch from Zell to fix cache keys.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2108 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-01 19:53:09 +00:00
ray
fcb3ba6fd5
i -> ii, combined two identical cases.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2107 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-25 19:45:11 +00:00
mdb
9d9f8a68c3
Just provide the classname and method when providing log message context.
...
Tidied up some other bits.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2106 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-23 18:37:34 +00:00
mdb
b18001332f
Oops, we were using _result to pass the record into the modifier in the first
...
place. We'll continue to do that and clear out _result during invoke() which is
a wee bit clearer anyway.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2105 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-23 18:20:08 +00:00
mdb
47e9790561
Flush our record from the cache if we update just some fields in the record. In
...
the future we'll be extra clever and update just those fields in the cached
record if we have one.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2104 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-23 00:54:15 +00:00
ray
f753ce2198
FailureListener, from Charlie Groves.
...
A nice alternate to ComplainingListener. ComplainingListener has the
wee downside of needing to compose your error text prior to making
a request, even though the common case is to throw away the error string.
This class has the downside of requiring a new anonymous class to be
generated by the compiler every time you use it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2103 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-17 21:10:37 +00:00
ray
a67145f933
Catch any Throwable in safeToString().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2102 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-10 18:47:41 +00:00
mdb
92a095968c
Widening, catch and cope with security exceptions, which are somewhat fiddly,
...
we can enumerate non-public members on some classes, whereas on other classes
we can't even call getDeclaredFields(). Things work for now and at some point
I'm going to change Presents to eliminate the need for (field) reflection
completely.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2101 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-08 23:46:15 +00:00
mdb
6642bc00e7
Widening.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2100 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-08 23:40:51 +00:00
mdb
b2ffa3dc33
Run our Rename and Retype migrations after the default migrations so that we
...
don't freak out if a field is added, then renamed or retyped all in the same
migration. Now the column will be added with its proper name by the default
migrations and then the Rename migration will not freak out and the Retype
migration will NOOP.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2098 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-03 00:32:45 +00:00
mdb
3e6d8e5afb
Require a name for Index annotations because managing indices without a name is
...
a pain in the ass that we don't particularly need to spend time on.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2097 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-05-01 19:38:44 +00:00
ray
17c9fbedc5
Order by random. Probably this isn't very optimal.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2096 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-27 03:13:10 +00:00
mdb
c47fe8dbcc
Retroweaver cannot handle converting things that use Closeable, so we must
...
remain backward compatible.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2095 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-23 21:58:33 +00:00
ray
31262e70b2
List is as specific as we want to be here.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2094 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-20 01:56:43 +00:00
ray
8973ceeedb
Return values should be as specific as possible.
...
(Method parameters should be as generic as possible.)
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2093 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-20 01:37:44 +00:00
mdb
7fb65d1851
Let's do that abstract check up here as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2092 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:27:18 +00:00
mdb
f4835cdd17
Whoops, we want declared fields for generating the constants but all fields for
...
determining the public key. As always, the plot is thicker.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2091 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:25:45 +00:00
mdb
834275d387
Let's put that check in the right place.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2090 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:21:49 +00:00
mdb
0ae7308418
Three things:
...
- don't try to generate getKey() for abstract classes;
- get all of our class's fields, not just the ones declared in this class; do
so using ClassUtil.getFields() rather than Class.getFields() because the
latter returns the fields in a random order which is annoying whereas
ClassUtil.getFields() returns them in an intuitive order (declaration order
of the super-most class, then declaration order of the first derived class
and so on);
- use Field.getAnnotations() rather than Field.getDeclaredAnnotations() just
for consistency, even though you can't "override" a field and inherit
annotations from your parent class (but if someday we have annotated
PersistentRecord methods we'll want to use getAnnotations() not
getDeclaredAnnotations() so we should provide appropriate copy and paste
fodder).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2089 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-19 21:16:50 +00:00
mdb
bed88f4d21
Introspection is expensive and the number of persistent classes is small, so
...
we'll cache the introspected primary key fields and reuse them. This has the
added benefit that we can eliminate storing the key fields entirely because we
know they must be exactly the set of primary key fields for the object which
never changes.
We will have to ensure that we flush our caches whenever we do a new release,
but we would have to do that anyway for a variety of reasons. Actually, we
could perhaps make use of the persistent object's versions and note the version
number of the cached instances in the cache and ignore the cache if they
differ.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2088 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 18:09:42 +00:00
mdb
a130a89a44
Oops, forgot to strip whitespace from blank lines.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2087 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 17:44:41 +00:00
mdb
cf0de28c0c
Patch from Zell to ensure that Key objects are only constructed with primary
...
key fields and also don't leave any out.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2086 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-17 17:42:56 +00:00
mdb
b95fdfa64f
Use the handy new Closeable interface that Ray pointed out. Left the
...
InputStream and OutputStream versions in to avoid breaking binary
compatibility.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2085 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-13 21:31:23 +00:00
mdb
937ed93170
Added close() methods for Reader and Writer.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2084 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-13 21:00:21 +00:00
mdb
3bb6abd2ad
Widened. Added support for overriding the site on a particular request.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2081 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-04-03 22:08:27 +00:00
andrzej
b045017252
Added a hasResult method for whenever someone needs it.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2080 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-30 19:39:00 +00:00
andrzej
8974917d87
No need to check those values, actually.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2079 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-29 19:07:43 +00:00
andrzej
39cd3f3341
Added a peekResult method to ResultHandler.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2078 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-29 19:04:20 +00:00
andrzej
138f38c502
Allow subclasses to customize the reference.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2077 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-22 20:18:30 +00:00
andrzej
39b92d513f
Added Ray's changes.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2076 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 23:07:25 +00:00
mjohnson
927d8c3336
Added warnedUpdate to the SimpleRepository
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2075 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 23:00:21 +00:00
andrzej
e038506fc5
Added a ResultHandler class to store results after they've been
...
returned.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2074 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-21 22:41:36 +00:00
mdb
54ee0f3d99
Generate getKey() methods for our PersistentRecord classes in addition to
...
adding the field/column constants. Moved some of GenUtil into samskivert in the
process.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2073 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-16 20:50:10 +00:00