org.openorb.pss.connector.file

Class TransactionalDataManager

public class TransactionalDataManager extends DataManager

This class is a transactional resource this is used to write/read data into the datastore

Author: Jerome Daniel

Constructor Summary
TransactionalDataManager(DataManager delegated)
Constructor
Method Summary
voidbegin()
This operation is used to begin a transaction
booleanbegun()
Is the transaction begun ?
voidclose()
voidcommit()
This operation is used to commit a transaction
Enumerationcontent()
Return the datastore content under an enumeration format
longdatastoreSize()
Return the datastore length
voidfinalize()
Finalize operation
voidflush()
voidforget()
This operation is used to forget the transaction
voidfree_all()
Hashtableget_index_table()
Return the index table
Stringhome()
Return home base name
voidinvalidate_entry(PID pid)
Invalidate an entry
Stringkey()
Return the hashtable key
Objectlock()
Return the current lock
voidlock_flush(boolean lock)
Disable or enable flush
longnextFreeID()
This operation returns a new free ID.
DataEntryread_entry(PID pid)
Read an entry from its PID.
DataEntryread_entry_from_index(LongHolder index)
The operation reads an entry from its PID.
voidresume_waited()
The transaction is ended, we can now resume all threads
voidrollback()
This operation is used to rollback a transaction
voidshare()
Increment the shared value counter
booleanshared()
Is this data manager shared ?
voidwrite_entry(DataEntry entry)
Add a data into the cache.

Constructor Detail

TransactionalDataManager

public TransactionalDataManager(DataManager delegated)
Constructor

Method Detail

begin

public void begin()
This operation is used to begin a transaction

begun

public boolean begun()
Is the transaction begun ?

close

public void close()

commit

public void commit()
This operation is used to commit a transaction

content

public Enumeration content()
Return the datastore content under an enumeration format

datastoreSize

public long datastoreSize()
Return the datastore length

finalize

public void finalize()
Finalize operation

flush

public void flush()

forget

public void forget()
This operation is used to forget the transaction

free_all

public void free_all()

get_index_table

public Hashtable get_index_table()
Return the index table

home

public String home()
Return home base name

invalidate_entry

public void invalidate_entry(PID pid)
Invalidate an entry

key

public String key()
Return the hashtable key

lock

public Object lock()
Return the current lock

lock_flush

public void lock_flush(boolean lock)
Disable or enable flush

nextFreeID

public long nextFreeID()
This operation returns a new free ID.

read_entry

public DataEntry read_entry(PID pid)
Read an entry from its PID. If the entry is already in the cache, return it.

read_entry_from_index

public DataEntry read_entry_from_index(LongHolder index)
The operation reads an entry from its PID.

resume_waited

public void resume_waited()
The transaction is ended, we can now resume all threads

rollback

public void rollback()
This operation is used to rollback a transaction

share

public void share()
Increment the shared value counter

shared

public boolean shared()
Is this data manager shared ?

write_entry

public void write_entry(DataEntry entry)
Add a data into the cache.