|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.store.AbstractStore<ByteArray,byte[],byte[]>
voldemort.store.compress.CompressingStore
public class CompressingStore
A Store Decorator that compresses keys and values as it stores them and
uncompresses them as it reads them based on the CompressionStrategy objects
provided. A NoopCompressionStrategy
can be used if no compression is
desired for either keys or values.
Transforms are not compressed
CompressionStrategy
,
NoopCompressionStrategy
,
GzipCompressionStrategy
Constructor Summary | |
---|---|
CompressingStore(Store<ByteArray,byte[],byte[]> innerStore,
CompressionStrategy keysCompressionStrategy,
CompressionStrategy valuesCompressionStrategy)
|
Method Summary | |
---|---|
void |
close()
Close the store. |
boolean |
delete(ByteArray key,
Version version)
Delete all entries prior to the given version |
java.util.List<Versioned<byte[]>> |
get(ByteArray key,
byte[] transforms)
Get the value associated with the given key |
java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> |
getAll(java.lang.Iterable<ByteArray> keys,
java.util.Map<ByteArray,byte[]> transforms)
Get the values associated with the given keys and returns them in a Map of keys to a list of versioned values. |
java.lang.Object |
getCapability(StoreCapabilityType capability)
Get some capability of the store. |
java.util.List<Version> |
getVersions(ByteArray key)
Get the versions associated with the given key. |
void |
put(ByteArray key,
Versioned<byte[]> value,
byte[] transforms)
Associate the value with the key and version in this store |
Methods inherited from class voldemort.store.AbstractStore |
---|
delete, get, getAll, getName, put |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompressingStore(Store<ByteArray,byte[],byte[]> innerStore, CompressionStrategy keysCompressionStrategy, CompressionStrategy valuesCompressionStrategy)
Method Detail |
---|
public java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> getAll(java.lang.Iterable<ByteArray> keys, java.util.Map<ByteArray,byte[]> transforms) throws VoldemortException
Store
getAll
in interface Store<ByteArray,byte[],byte[]>
getAll
in class AbstractStore<ByteArray,byte[],byte[]>
keys
- The keys to check for.
VoldemortException
public java.util.List<Versioned<byte[]>> get(ByteArray key, byte[] transforms) throws VoldemortException
Store
get
in interface Store<ByteArray,byte[],byte[]>
get
in class AbstractStore<ByteArray,byte[],byte[]>
key
- The key to check for
VoldemortException
public java.util.List<Version> getVersions(ByteArray key)
Store
getVersions
in interface Store<ByteArray,byte[],byte[]>
getVersions
in class AbstractStore<ByteArray,byte[],byte[]>
key
- The key to retrieve the versions for
public void put(ByteArray key, Versioned<byte[]> value, byte[] transforms) throws VoldemortException
Store
put
in interface Store<ByteArray,byte[],byte[]>
put
in class AbstractStore<ByteArray,byte[],byte[]>
key
- The key to usevalue
- The value to store and its version.
VoldemortException
public void close() throws VoldemortException
Store
close
in interface Store<ByteArray,byte[],byte[]>
close
in class AbstractStore<ByteArray,byte[],byte[]>
VoldemortException
- If closing fails.public java.lang.Object getCapability(StoreCapabilityType capability)
Store
getCapability
in interface Store<ByteArray,byte[],byte[]>
getCapability
in class AbstractStore<ByteArray,byte[],byte[]>
capability
- The capability type to retrieve
public boolean delete(ByteArray key, Version version) throws VoldemortException
Store
delete
in interface Store<ByteArray,byte[],byte[]>
delete
in class AbstractStore<ByteArray,byte[],byte[]>
key
- The key to deleteversion
- The current value of the key
VoldemortException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |