org.hsqldb.persist
Class SimpleStore
- java.lang.Object
-
- org.hsqldb.persist.SimpleStore
-
- All Implemented Interfaces:
- PersistentStore
- Direct Known Subclasses:
- BlockObjectStore
public abstract class SimpleStore extends java.lang.Object implements PersistentStore
- Since:
- 2.3.0
-
-
Field Summary
Fields Modifier and Type Field and Description DataFileCachecache-
Fields inherited from interface org.hsqldb.persist.PersistentStore
emptyArray, INT_STORE_SIZE, LONG_STORE_SIZE, SHORT_STORE_SIZE
-
-
Constructor Summary
Constructors Constructor and Description SimpleStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleancanRead(Session session, CachedObject object, int mode, int[] colMap)booleancanRead(Session session, long pos, int mode, int[] colMap)voidcommitPersistence(CachedObject object)commit persisted imagevoidcommitRow(Session session, Row row, int changeAction, int txModel)voiddelete(Session session, Row row)longelementCount()longelementCount(Session session)longelementCountUnique(Index index)CachedObjectget(CachedObject object, boolean keep)CachedObjectget(CachedObject object, RowInputInterface in)CachedObjectget(long i)get objectCachedObjectget(long i, boolean keep)get object with keep, ensuring future gets will return the same instance of the objectintgetAccessCount()CachedObjectgetAccessor(Index key)Index[]getAccessorKeys()PersistentStoregetAccessorStore(Index index)DataFileCachegetCache()intgetDefaultObjectSize()CachedObjectgetNewCachedObject(Session session, java.lang.Object object, boolean tx)TableSpaceManagergetSpaceManager()TableBasegetTable()longgetTimestamp()booleanhasNull(int pos)voidindexRow(Session session, Row row)voidindexRows(Session session)booleanisMemory()voidmoveData(Session session, PersistentStore other, int colindex, int adjust)voidmoveDataToSpace()voidpostCommitAction(Session session, RowAction rowAction)voidreindex(Session session, Index index)voidrelease()voidremove(CachedObject object)remove both persisted and cached copiesvoidremoveAll()voidresetAccessorKeys(Session session, Index[] keys)voidrollbackRow(Session session, Row row, int changeAction, int txModel)RowIteratorrowIterator()doublesearchCost(Session session, Index idx, int count, int opType)voidset(CachedObject object)voidsetAccessor(Index key, CachedObject accessor)voidsetAccessor(Index key, long accessor)voidsetCache(DataFileCache cache)voidsetElementCount(Index key, long size, long uniqueSize)voidsetMemory(boolean mode)voidsetReadOnly(boolean readonly)voidsetSpaceManager(TableSpaceManager manager)voidsetTimestamp(long timestamp)voidwriteLock()voidwriteUnlock()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hsqldb.persist.PersistentStore
add, get, getNewInstance
-
-
-
-
Field Detail
-
cache
public DataFileCache cache
-
-
Method Detail
-
set
public void set(CachedObject object)
- Specified by:
setin interfacePersistentStore
-
get
public CachedObject get(long i)
Description copied from interface:PersistentStoreget object- Specified by:
getin interfacePersistentStore
-
get
public CachedObject get(CachedObject object, boolean keep)
- Specified by:
getin interfacePersistentStore
-
get
public CachedObject get(long i, boolean keep)
Description copied from interface:PersistentStoreget object with keep, ensuring future gets will return the same instance of the object- Specified by:
getin interfacePersistentStore
-
remove
public void remove(CachedObject object)
Description copied from interface:PersistentStoreremove both persisted and cached copies- Specified by:
removein interfacePersistentStore
-
canRead
public boolean canRead(Session session, long pos, int mode, int[] colMap)
- Specified by:
canReadin interfacePersistentStore
-
canRead
public boolean canRead(Session session, CachedObject object, int mode, int[] colMap)
- Specified by:
canReadin interfacePersistentStore
-
commitPersistence
public void commitPersistence(CachedObject object)
Description copied from interface:PersistentStorecommit persisted image- Specified by:
commitPersistencein interfacePersistentStore
-
getDefaultObjectSize
public int getDefaultObjectSize()
- Specified by:
getDefaultObjectSizein interfacePersistentStore
-
getNewCachedObject
public CachedObject getNewCachedObject(Session session, java.lang.Object object, boolean tx) throws HsqlException
- Specified by:
getNewCachedObjectin interfacePersistentStore- Throws:
HsqlException
-
removeAll
public void removeAll()
- Specified by:
removeAllin interfacePersistentStore
-
getCache
public DataFileCache getCache()
- Specified by:
getCachein interfacePersistentStore
-
getSpaceManager
public TableSpaceManager getSpaceManager()
- Specified by:
getSpaceManagerin interfacePersistentStore
-
setSpaceManager
public void setSpaceManager(TableSpaceManager manager)
- Specified by:
setSpaceManagerin interfacePersistentStore
-
isMemory
public boolean isMemory()
- Specified by:
isMemoryin interfacePersistentStore
-
reindex
public void reindex(Session session, Index index)
- Specified by:
reindexin interfacePersistentStore
-
setCache
public void setCache(DataFileCache cache)
- Specified by:
setCachein interfacePersistentStore
-
release
public void release()
- Specified by:
releasein interfacePersistentStore
-
getAccessorStore
public PersistentStore getAccessorStore(Index index)
- Specified by:
getAccessorStorein interfacePersistentStore
-
getAccessor
public CachedObject getAccessor(Index key)
- Specified by:
getAccessorin interfacePersistentStore
-
searchCost
public double searchCost(Session session, Index idx, int count, int opType)
- Specified by:
searchCostin interfacePersistentStore
-
elementCount
public long elementCount()
- Specified by:
elementCountin interfacePersistentStore
-
elementCount
public long elementCount(Session session)
- Specified by:
elementCountin interfacePersistentStore
-
elementCountUnique
public long elementCountUnique(Index index)
- Specified by:
elementCountUniquein interfacePersistentStore
-
setElementCount
public void setElementCount(Index key, long size, long uniqueSize)
- Specified by:
setElementCountin interfacePersistentStore
-
setAccessor
public void setAccessor(Index key, long accessor)
- Specified by:
setAccessorin interfacePersistentStore
-
setAccessor
public void setAccessor(Index key, CachedObject accessor)
- Specified by:
setAccessorin interfacePersistentStore
-
hasNull
public boolean hasNull(int pos)
- Specified by:
hasNullin interfacePersistentStore
-
resetAccessorKeys
public void resetAccessorKeys(Session session, Index[] keys) throws HsqlException
- Specified by:
resetAccessorKeysin interfacePersistentStore- Throws:
HsqlException
-
setMemory
public void setMemory(boolean mode)
- Specified by:
setMemoryin interfacePersistentStore
-
delete
public void delete(Session session, Row row)
- Specified by:
deletein interfacePersistentStore
-
get
public CachedObject get(CachedObject object, RowInputInterface in)
- Specified by:
getin interfacePersistentStore
-
indexRow
public void indexRow(Session session, Row row) throws HsqlException
- Specified by:
indexRowin interfacePersistentStore- Throws:
HsqlException
-
indexRows
public void indexRows(Session session) throws HsqlException
- Specified by:
indexRowsin interfacePersistentStore- Throws:
HsqlException
-
rowIterator
public RowIterator rowIterator()
- Specified by:
rowIteratorin interfacePersistentStore
-
getAccessCount
public int getAccessCount()
- Specified by:
getAccessCountin interfacePersistentStore
-
getAccessorKeys
public Index[] getAccessorKeys()
- Specified by:
getAccessorKeysin interfacePersistentStore
-
moveDataToSpace
public void moveDataToSpace()
- Specified by:
moveDataToSpacein interfacePersistentStore
-
moveData
public void moveData(Session session, PersistentStore other, int colindex, int adjust)
- Specified by:
moveDatain interfacePersistentStore
-
setReadOnly
public void setReadOnly(boolean readonly)
- Specified by:
setReadOnlyin interfacePersistentStore
-
writeLock
public void writeLock()
- Specified by:
writeLockin interfacePersistentStore
-
writeUnlock
public void writeUnlock()
- Specified by:
writeUnlockin interfacePersistentStore
-
getTable
public TableBase getTable()
- Specified by:
getTablein interfacePersistentStore
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfacePersistentStore
-
setTimestamp
public void setTimestamp(long timestamp)
- Specified by:
setTimestampin interfacePersistentStore
-
commitRow
public void commitRow(Session session, Row row, int changeAction, int txModel)
- Specified by:
commitRowin interfacePersistentStore
-
rollbackRow
public void rollbackRow(Session session, Row row, int changeAction, int txModel)
- Specified by:
rollbackRowin interfacePersistentStore
-
postCommitAction
public void postCommitAction(Session session, RowAction rowAction)
- Specified by:
postCommitActionin interfacePersistentStore
-
-
DataMelt 3.0 © DataMelt by jWork.ORG