org.sharengo.wikitty.hbase
Class WikittyExtensionStorageHBase
java.lang.Object
org.sharengo.wikitty.hbase.WikittyExtensionStorageHBase
- All Implemented Interfaces:
- WikittyExtensionStorage
public class WikittyExtensionStorageHBase
- extends Object
- implements WikittyExtensionStorage
- Version:
- $Revision: 1 $
Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $
by : $Author: echatellier $
- Author:
- poussin
|
Field Summary |
protected Map<String,WikittyExtension> |
extensionCache
cache for extension key: ext id (extname[extversion]) value: WikittyExtension
TODO poussin 20090813 use Map with soft reference (commons-collection) |
protected org.apache.hadoop.hbase.client.HTable |
hTable
storage for extension |
protected Map<String,String> |
lastVersion
cache for last extension version; key: extName value: extVersion |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hTable
protected org.apache.hadoop.hbase.client.HTable hTable
- storage for extension
extensionCache
protected Map<String,WikittyExtension> extensionCache
- cache for extension key: ext id (extname[extversion]) value: WikittyExtension
TODO poussin 20090813 use Map with soft reference (commons-collection)
lastVersion
protected Map<String,String> lastVersion
- cache for last extension version; key: extName value: extVersion
WikittyExtensionStorageHBase
public WikittyExtensionStorageHBase()
store
public UpdateResponse store(WikittyTransaction transaction,
Collection<WikittyExtension> extensions)
- Specified by:
store in interface WikittyExtensionStorage
exists
public boolean exists(WikittyTransaction transaction,
String id)
- Specified by:
exists in interface WikittyExtensionStorage
getAllExtensionIds
public List<String> getAllExtensionIds(WikittyTransaction transaction)
- Specified by:
getAllExtensionIds in interface WikittyExtensionStorage
getAllExtensionsRequires
public List<String> getAllExtensionsRequires(WikittyTransaction transaction,
String extensionName)
- Specified by:
getAllExtensionsRequires in interface WikittyExtensionStorage
getLastVersion
public String getLastVersion(WikittyTransaction transaction,
String extName)
- return last version available for specified extension name
- Specified by:
getLastVersion in interface WikittyExtensionStorage
- Parameters:
name - name of extension
- Returns:
- last version availble for this version, or null if extension
doesn't exist
restore
public WikittyExtension restore(WikittyTransaction transaction,
String name,
String version)
throws WikittyException
- Specified by:
restore in interface WikittyExtensionStorage
- Throws:
WikittyException
clear
public void clear(WikittyTransaction transaction)
- Specified by:
clear in interface WikittyExtensionStorage
Copyright © 2009-2010 CodeLutin. All Rights Reserved.