org.openorb.pss.connector.file

Class DataManager

public class DataManager extends Object

A data manager manages data entries into a persistent file storage.

Author: Jerome Daniel

Constructor Summary
DataManager(String home_name, String datastore_name, ORBInitInfo info)
Constructor
DataManager()
Constuctor used for transaction delegation.
Method Summary
voidaddListener(Thread thread, TransactionalDataManagerSerializable tmz)
Add a listener
voidclose()
Enumerationcontent()
Return the datastore content under an enumeration format
longdatastoreSize()
Return the datastore length
voiddestroy()
This operation is used to destroy the datastore
voidfinalize()
Finalize operation
voidflush()
voidfree_all()
Hashtableget_clean_table()
Return the clean index table
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_clean_table(PID pid)
Read an entry from its PID.
DataEntryread_entry_from_index(LongHolder index)
The operation reads an entry from its PID.
voidshare()
Increment the shared value counter
booleanshared()
Is this data manager shared ?
booleantransaction_lock()
Return true if this data manager is locked for a transaction
voidtransaction_lock(TransactionalDataManagerSerializable lock)
Set the lock value
voidtransaction_unlock()
Unlock this data manager for another transaction
voidwrite_entry(DataEntry entry)
Add a data into the cache.

Constructor Detail

DataManager

public DataManager(String home_name, String datastore_name, ORBInitInfo info)
Constructor

DataManager

public DataManager()
Constuctor used for transaction delegation.

Method Detail

addListener

public void addListener(Thread thread, TransactionalDataManagerSerializable tmz)
Add a listener

close

public void close()

content

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

datastoreSize

public long datastoreSize()
Return the datastore length

destroy

public void destroy()
This operation is used to destroy the datastore

finalize

public void finalize()
Finalize operation

flush

public void flush()

free_all

public void free_all()

get_clean_table

public Hashtable get_clean_table()
Return the clean index table

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_clean_table

public DataEntry read_entry_from_clean_table(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.

share

public void share()
Increment the shared value counter

shared

public boolean shared()
Is this data manager shared ?

transaction_lock

public boolean transaction_lock()
Return true if this data manager is locked for a transaction

transaction_lock

public void transaction_lock(TransactionalDataManagerSerializable lock)
Set the lock value

transaction_unlock

public void transaction_unlock()
Unlock this data manager for another transaction

write_entry

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