|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.store.mysql.MysqlStorageEngine
public class MysqlStorageEngine
A StorageEngine that uses Mysql for persistence
| Constructor Summary | |
|---|---|
MysqlStorageEngine(java.lang.String name,
javax.sql.DataSource datasource)
|
|
| Method Summary | |
|---|---|
boolean |
beginBatchModifications()
A lot of storage engines support efficient methods for performing large number of writes (puts/deletes) against the data source. |
void |
close()
Close the store. |
void |
create()
|
boolean |
delete(ByteArray key,
Version maxVersion)
Delete all entries prior to the given version |
void |
destroy()
|
boolean |
endBatchModifications()
|
ClosableIterator<Pair<ByteArray,Versioned<byte[]>>> |
entries()
Get an iterator over pairs of entries in the store. |
ClosableIterator<Pair<ByteArray,Versioned<byte[]>>> |
entries(int partition)
Get an iterator over pairs of entries in a store's partition. |
void |
execute(java.lang.String query)
|
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.lang.String |
getName()
|
java.util.List<Version> |
getVersions(ByteArray key)
|
boolean |
isPartitionAware()
Is the data persistence aware of partitions? In other words is the data internally stored on a per partition basis or together |
boolean |
isPartitionScanSupported()
Does the storage engine support efficient scanning of a single partition |
ClosableIterator<ByteArray> |
keys()
Get an iterator over keys in the store. |
ClosableIterator<ByteArray> |
keys(int partition)
Get an iterator over keys in the store's partition Note that the iterator need not be threadsafe, and that it must be manually closed after use. |
void |
put(ByteArray key,
Versioned<byte[]> value,
byte[] transforms)
Associate the value with the key and version in this store |
void |
truncate()
Truncate all entries in the store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MysqlStorageEngine(java.lang.String name,
javax.sql.DataSource datasource)
| Method Detail |
|---|
public void destroy()
public void create()
public void execute(java.lang.String query)
public ClosableIterator<ByteArray> keys()
StorageEngine
keys in interface StorageEngine<ByteArray,byte[],byte[]>public void truncate()
StorageEngine
truncate in interface StorageEngine<ByteArray,byte[],byte[]>public ClosableIterator<Pair<ByteArray,Versioned<byte[]>>> entries()
StorageEngine
entries in interface StorageEngine<ByteArray,byte[],byte[]>public ClosableIterator<Pair<ByteArray,Versioned<byte[]>>> entries(int partition)
StorageEngine
entries in interface StorageEngine<ByteArray,byte[],byte[]>partition - partition whose entries are to be fetched
public ClosableIterator<ByteArray> keys(int partition)
StorageEngine
keys in interface StorageEngine<ByteArray,byte[],byte[]>partition - partition whose keys are to be fetched
public void close()
throws PersistenceFailureException
Store
close in interface Store<ByteArray,byte[],byte[]>PersistenceFailureExceptionpublic java.lang.Object getCapability(StoreCapabilityType capability)
Store
getCapability in interface Store<ByteArray,byte[],byte[]>capability - The capability type to retrieve
public boolean delete(ByteArray key,
Version maxVersion)
throws PersistenceFailureException
Store
delete in interface Store<ByteArray,byte[],byte[]>key - The key to deletemaxVersion - The current value of the key
PersistenceFailureException
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[]>keys - The keys to check for.
VoldemortException
public java.util.List<Versioned<byte[]>> get(ByteArray key,
byte[] transforms)
throws PersistenceFailureException
Store
get in interface Store<ByteArray,byte[],byte[]>key - The key to check for
PersistenceFailureExceptionpublic java.lang.String getName()
getName in interface Store<ByteArray,byte[],byte[]>
public void put(ByteArray key,
Versioned<byte[]> value,
byte[] transforms)
throws PersistenceFailureException
Store
put in interface Store<ByteArray,byte[],byte[]>key - The key to usevalue - The value to store and its version.
PersistenceFailureExceptionpublic java.util.List<Version> getVersions(ByteArray key)
getVersions in interface Store<ByteArray,byte[],byte[]>public boolean isPartitionAware()
StorageEngine
isPartitionAware in interface StorageEngine<ByteArray,byte[],byte[]>public boolean isPartitionScanSupported()
StorageEngine
isPartitionScanSupported in interface StorageEngine<ByteArray,byte[],byte[]>public boolean beginBatchModifications()
StorageEngine
beginBatchModifications in interface StorageEngine<ByteArray,byte[],byte[]>public boolean endBatchModifications()
endBatchModifications in interface StorageEngine<ByteArray,byte[],byte[]>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||