From 670711f96a0b78cb674aaa090e965922e028d276 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 25 Sep 2012 02:33:25 +0000 Subject: Support instantiation by just the key. --- .../java/com/amazon/carbonado/raw/GenericStorableCodec.java | 12 ++++++++++++ src/main/java/com/amazon/carbonado/raw/StorableCodec.java | 9 +++++++++ 2 files changed, 21 insertions(+) (limited to 'src/main') diff --git a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java index 681909a..92a6473 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java @@ -357,6 +357,18 @@ public class GenericStorableCodec implements StorableCodec { */ S instantiate(); + /** + * Instantiate a Storable with no value defined yet. The default {@link + * RawSupport} is supplied to the instance. + * + * @throws IllegalStateException if no default support exists + * @since 1.2 + */ + S instantiate(byte[] key) throws FetchException; + /** * Instantiate a Storable with a specific key and value. The default * {@link RawSupport} is supplied to the instance. -- cgit v1.2.3