|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--suncertify.db.ServerImpl
The class implements the DbServer interface. It is the Server of the DBMS system. It is a subclass of java.rmi.server.UniCastRemoteObject.
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary | |
ServerImpl(java.lang.String dbName)
The class Constructor to create the Server of the Database whose name is specified. |
|
ServerImpl(java.lang.String dbName,
FieldInfo[] fields)
The class Constructor to create a server for an initially empty DataBase whose name and schema is specified. |
Method Summary | |
void |
add(java.lang.String[] newData)
The method to add a new record into the DataBase. |
void |
addMul(java.lang.String[][] newDataList)
The method to add multiple records into the DataBase. |
void |
delete(DataInfo toDelete)
The method to delete a record from the DataBase. |
protected void |
finalize()
The finalization method called at the time of garbage collection. |
DataInfo |
find(java.lang.String toMatch)
The method to find the record whose key is specified. |
DataInfo[] |
findCriteria(java.lang.String criteria)
The method to find all the records that exactly matches a given criteria. |
FieldInfo[] |
getFieldInfo()
The method to get the Schema of the DataBase as collection of FieldInfos. |
DataInfo |
getRecord(int recNum)
The method to get the record whose record number is provided. |
int |
getRecordCount()
The method to get the total count of records in the DataBase. |
void |
lock(int recNum,
java.lang.String clientId)
The method to lock a record in the database. |
static void |
main(java.lang.String[] args)
The main method to register the Remote objects with the bootstrap register at the server side. |
void |
modify(DataInfo newData)
The method to modify a record in the DataBase. |
void |
modifyMul(DataInfo[] newDataList)
The method to modify multiple number of records in the DataBase. |
void |
unLock(int recNum,
java.lang.String clientID)
The method to unlock a record. |
void |
unreferenced()
The method which is called whenever no clients are referencing the remote object. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone,
exportObject,
exportObject,
exportObject,
unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost,
getLog,
setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals,
getRef,
hashCode,
toString,
toStub |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ServerImpl(java.lang.String dbName) throws java.rmi.RemoteException
public ServerImpl(java.lang.String dbName, FieldInfo[] fields) throws java.rmi.RemoteException
Method Detail |
public void add(java.lang.String[] newData) throws java.rmi.RemoteException
newData
- : The new record to be inserted into the DataBase.public void addMul(java.lang.String[][] newDataList) throws java.rmi.RemoteException
newDataList
- : The list of new records to be entered into the DataBase.public void delete(DataInfo toDelete) throws java.rmi.RemoteException
toDelete
- : The record which is to be deleted.public DataInfo find(java.lang.String toMatch) throws java.rmi.RemoteException
toMatch
- : The Key of the record to find.public DataInfo[] findCriteria(java.lang.String criteria) throws java.rmi.RemoteException
criteria:
- The criteria in the form of "field1Name=value1...fieldnName=valuen".public FieldInfo[] getFieldInfo() throws java.rmi.RemoteException
public DataInfo getRecord(int recNum) throws java.rmi.RemoteException
recNum
- : The record number of the record that is to be fetched.public int getRecordCount() throws java.rmi.RemoteException
public void lock(int recNum, java.lang.String clientId) throws java.rmi.RemoteException
recNum
- : The record number of the record that is to be locked.clientId
- : The ID of the client that has requested to place the lock.public void modify(DataInfo newData) throws java.rmi.RemoteException
newData
- : The new set of values.public void modifyMul(DataInfo[] newDataList) throws java.rmi.RemoteException
newDataList
- : The list of new data to be modified in the DataBase./public void unLock(int recNum, java.lang.String clientID) throws java.rmi.RemoteException
recNum
- : The record number from which the record number is to be released.clientId
- : The Id of the client requesting release of lock.protected void finalize()
public void unreferenced()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |