A C D E F G H I K L M N P Q R S T U V W

A

abort(Transaction) - Method in class tp.impl.MyRM
 
abort(Transaction) - Method in class tp.impl.MyTM
 
abort(Transaction) - Method in class tp.impl.MyWC
 
abort(Transaction) - Method in interface tp.RM
abort transaction
abort(Transaction) - Method in interface tp.TM
abort transaction
abort(Transaction) - Method in interface tp.WC
Abort a transaction
add(Transaction, RID, int, int) - Method in class tp.impl.MyRM
 
add(Transaction, RID, int, int) - Method in interface tp.RM
add qty items described by resource.
addCars(Transaction, String, int, int) - Method in class tp.impl.MyWC
 
addCars(Transaction, String, int, int) - Method in interface tp.WC
Add cars to a location.
addr - Variable in class tp.impl.ServiceID
remote address.
addRooms(Transaction, String, int, int) - Method in class tp.impl.MyWC
 
addRooms(Transaction, String, int, int) - Method in interface tp.WC
Add rooms to a location.
addSeats(Transaction, String, int, int) - Method in class tp.impl.MyWC
 
addSeats(Transaction, String, int, int) - Method in interface tp.WC
Add seats to a flight This method will be used to create a new flight but if the flight already exists, seats will be added and the price overwritten

C

cancelItinerary(Customer) - Method in class tp.impl.MyWC
 
cancelItinerary(Customer) - Method in interface tp.WC
Cancel an itinerary owned by customer
CommandLineClient - Class in tp.client
default command line client for the project.
CommandLineClient(Registry, WC) - Constructor for class tp.client.CommandLineClient
 
commit(Transaction) - Method in class tp.impl.MyRM
 
commit(Transaction) - Method in class tp.impl.MyTM
 
commit(Transaction) - Method in class tp.impl.MyWC
 
commit(Transaction) - Method in interface tp.RM
commit transaction
commit(Transaction) - Method in interface tp.TM
commit transaction
commit(Transaction) - Method in interface tp.WC
Commit a transaction
compareTo(Customer) - Method in class tp.Customer
 
compareTo(ServiceID) - Method in class tp.impl.ServiceID
 
compareTo(LockableID) - Method in class tp.LockableID
 
compareTo(RID) - Method in class tp.RID
 
compareTo(Transaction) - Method in class tp.Transaction
 
concat(Lockable) - Method in class tp.LockableID
Construct a composite ID using this id as prefix.
conflicts(LM.LockType) - Method in enum tp.LM.LockType
check whether current lock type conflicts to this lock type
CSEP545Service - Interface in tp.impl
Common service interface for the project.
CSEP545Service.Type - Enum in tp.impl
type of service
CSEP545ServiceObject - Class in tp.impl
A stub class to drive project services.
CSEP545ServiceObject() - Constructor for class tp.impl.CSEP545ServiceObject
 
Customer - Class in tp
unique customer identifier
Customer() - Constructor for class tp.Customer
 
Customer(String) - Constructor for class tp.Customer
 
Customer(UUID) - Constructor for class tp.Customer
 

D

DEFAULT_DEADLOCK_TIMEOUT - Static variable in interface tp.LM
A transaction is considered in deadlock if it waits for lock more than 10 seconds.
delete(Transaction, RID) - Method in class tp.impl.MyRM
 
delete(Transaction, RID, int) - Method in class tp.impl.MyRM
 
delete(Transaction, RID) - Method in interface tp.RM
Drop resource from this RM.
delete(Transaction, RID, int) - Method in interface tp.RM
Remove exactly qty unreserved resource from this RM.
deleteCars(Transaction, String, int) - Method in class tp.impl.MyWC
 
deleteCars(Transaction, String, int) - Method in interface tp.WC
Delete cars.
deleteFlight(Transaction, String) - Method in class tp.impl.MyWC
 
deleteFlight(Transaction, String) - Method in interface tp.WC
Delete the entire flight.
deleteRooms(Transaction, String, int) - Method in class tp.impl.MyWC
 
deleteRooms(Transaction, String, int) - Method in interface tp.WC
Delete rooms.
deleteSeats(Transaction, String, int) - Method in class tp.impl.MyWC
 
deleteSeats(Transaction, String, int) - Method in interface tp.WC
delete seats from a flight
dir - Variable in class tp.impl.CSEP545ServiceObject
directory to store all data files

E

enlist(Transaction, String) - Method in class tp.impl.MyTM
 
enlist(Transaction, String) - Method in interface tp.TM
enlist the RM as a member of this transaction
equals(Object) - Method in class tp.Customer
 
equals(Object) - Method in class tp.impl.ServiceID
 
equals(Object) - Method in class tp.LockableID
 
equals(Object) - Method in class tp.RID
 
equals(Object) - Method in class tp.Transaction
 

F

forCar(String) - Static method in class tp.RID
convenient method to create car resource identifier
forFlight(int) - Static method in class tp.RID
convenient method to create flight resource identifier
forFlight(String) - Static method in class tp.RID
convenient method to create flight resource identifier
forRM() - Static method in class tp.impl.ServiceID
service id for default RM instance
forRM(String) - Static method in class tp.impl.ServiceID
 
forRoom(String) - Static method in class tp.RID
convenient method to create room resource identifier
forTM() - Static method in class tp.impl.ServiceID
service id for default TM instance
forWC() - Static method in class tp.impl.ServiceID
service id for default WC instance
forWC(String) - Static method in class tp.impl.ServiceID
 

G

getDataRoot() - Method in class tp.impl.CSEP545ServiceObject
Get root directory where local data files are located.
getInstance(String) - Static method in enum tp.impl.CSEP545Service.Type
 
getInstance(String) - Static method in enum tp.RID.Type
 
getName() - Method in class tp.impl.MyRM
 
getName() - Method in class tp.impl.ServiceID
 
getName() - Method in class tp.LockableID
Get the last component of this id.
getName() - Method in class tp.RID
 
getName() - Method in interface tp.RM
get the name of this RM
getPrefix() - Method in class tp.LockableID
Get the prefix of this id.
getServiceID() - Method in interface tp.impl.CSEP545Service
Name of remote service object
getServiceID() - Method in class tp.impl.CSEP545ServiceObject
 
getTransaction() - Method in exception tp.LM.DeadLockException
 
getType() - Method in class tp.impl.ServiceID
get type of service id
getType() - Method in class tp.RID
get type of resource id

H

hashCode() - Method in class tp.Customer
 
hashCode() - Method in class tp.impl.ServiceID
 
hashCode() - Method in class tp.LockableID
 
hashCode() - Method in class tp.RID
 
hashCode() - Method in class tp.Transaction
 
hasType(String) - Method in enum tp.impl.CSEP545Service.Type
 

I

init(String[]) - Method in class tp.impl.CSEP545ServiceObject
IMPLEMENT THIS METHOD process command line parameters and setup any parameterized values.
init(String[]) - Method in class tp.impl.MyRM
 
init(String[]) - Method in class tp.impl.MyTM
 
init(String[]) - Method in class tp.impl.MyWC
 
initStorage() - Method in class tp.impl.CSEP545ServiceObject
IMPLEMENT THIS METHOD Initialize necessary data files.
initStorage() - Method in class tp.impl.MyRM
 
initStorage() - Method in class tp.impl.MyTM
 
initStorage() - Method in class tp.impl.MyWC
 
InvalidTransactionException - Exception in tp
The transaction identifier that was passed is not valid.
InvalidTransactionException(Transaction, String) - Constructor for exception tp.InvalidTransactionException
 
isCompatible(LM.LockType) - Method in enum tp.LM.LockType
check whether current lock type is compatible with this lock type
isPrefixOf(LockableID) - Method in class tp.LockableID
check whether this object is prefix of the other.

K

kill() - Method in interface tp.impl.CSEP545Service
Immediately kill remote service.
kill() - Method in class tp.impl.CSEP545ServiceObject
 

L

listCars(Transaction) - Method in class tp.impl.MyWC
 
listCars(Transaction) - Method in interface tp.WC
list existing cars
listCustomers(Transaction) - Method in class tp.impl.MyRM
 
listCustomers(Transaction) - Method in class tp.impl.MyWC
 
listCustomers(Transaction) - Method in interface tp.RM
list of customers who reserve resources managed by this RM
listCustomers(Transaction) - Method in interface tp.WC
list existing customers that have itinerary
listFlights(Transaction) - Method in class tp.impl.MyWC
 
listFlights(Transaction) - Method in interface tp.WC
list existing flights
listResources(Transaction, RID.Type) - Method in class tp.impl.MyRM
 
listResources(Transaction, RID.Type) - Method in interface tp.RM
list of resources
listRooms(Transaction) - Method in class tp.impl.MyWC
 
listRooms(Transaction) - Method in interface tp.WC
list existing rooms
LM - Interface in tp
Lock Manager interface
LM.DeadLockException - Exception in tp
 
LM.DeadLockException(Transaction, String) - Constructor for exception tp.LM.DeadLockException
 
LM.LockType - Enum in tp
 
Lockable - Interface in tp
A marker interface to indicate the type of lockable item.
LockableID - Class in tp
A generic ID that encapsulate a string.
LockableID(String) - Constructor for class tp.LockableID
 
LockableID(Lockable) - Constructor for class tp.LockableID
 
LockableID(String, Lockable) - Constructor for class tp.LockableID
 
LockableID(Lockable, Lockable) - Constructor for class tp.LockableID
 
LockableID(Lockable, String) - Constructor for class tp.LockableID
 
lockForRead(Transaction, Lockable) - Method in class tp.impl.MyLM
 
lockForRead(Transaction, Lockable) - Method in interface tp.LM
obtain a read lock for given resource
lockForWrite(Transaction, Lockable) - Method in class tp.impl.MyLM
 
lockForWrite(Transaction, Lockable) - Method in interface tp.LM
obtain a write lock for given resource
lookupRemote(String) - Method in class tp.impl.CSEP545ServiceObject
utility method to resolve remote object
lookupRemote(ServiceID) - Method in class tp.impl.CSEP545ServiceObject
utility method to resolve remote object
lookupRemote(CSEP545Service.Type, String) - Method in class tp.impl.CSEP545ServiceObject
utility method to resolve remote object
lookupRemote(CSEP545Service.Type) - Method in class tp.impl.CSEP545ServiceObject
 

M

main(String[]) - Static method in class tp.client.CommandLineClient
 
main(String[]) - Static method in class tp.impl.CSEP545ServiceObject
 
MAX_NAME_LENGTH - Static variable in class tp.impl.ServiceID
 
MAX_NAME_LENGTH - Static variable in class tp.RID
 
MyLM - Class in tp.impl
Your Lock Manager By default, it supports timeout based deadlock detection.
MyLM() - Constructor for class tp.impl.MyLM
 
MyRM - Class in tp.impl
Your Resource Manager.
MyRM() - Constructor for class tp.impl.MyRM
 
MyTM - Class in tp.impl
Your Transaction Manager
MyTM() - Constructor for class tp.impl.MyTM
 
MyWC - Class in tp.impl
Your Workflow Controller.
MyWC() - Constructor for class tp.impl.MyWC
 

N

name - Variable in class tp.impl.ServiceID
 
name - Variable in class tp.RID
 

P

parse(String) - Static method in class tp.impl.ServiceID
parse external string representation
parse(String) - Static method in class tp.RID
parse external string representation
prefix() - Method in enum tp.impl.CSEP545Service.Type
 
prefix() - Method in enum tp.RID.Type
 

Q

query(Transaction, RID) - Method in class tp.impl.MyRM
 
query(Transaction, RID) - Method in interface tp.RM
query: equivalent to queryCars, queryFlights, queryRooms
queryCar(Transaction, String) - Method in class tp.impl.MyWC
 
queryCar(Transaction, String) - Method in interface tp.WC
Get the number of cars available.
queryCarPrice(Transaction, String) - Method in class tp.impl.MyWC
 
queryCarPrice(Transaction, String) - Method in interface tp.WC
Get the cars price.
queryFlight(Transaction, String) - Method in class tp.impl.MyWC
 
queryFlight(Transaction, String) - Method in interface tp.WC
Get the number of seats available.
queryFlightPrice(Transaction, String) - Method in class tp.impl.MyWC
 
queryFlightPrice(Transaction, String) - Method in interface tp.WC
Get the flight price.
queryItinerary(Transaction, Customer) - Method in class tp.impl.MyWC
 
queryItinerary(Transaction, Customer) - Method in interface tp.WC
Get the bill for the customer
queryItineraryPrice(Transaction, Customer) - Method in class tp.impl.MyWC
 
queryItineraryPrice(Transaction, Customer) - Method in interface tp.WC
Get the total amount of money the customer owes
queryPrice(Transaction, RID) - Method in class tp.impl.MyRM
 
queryPrice(Transaction, RID) - Method in interface tp.RM
query: equivalent to queryCarsPrice, queryFlightsPrice, queryRoomsPrice
queryReserved(Transaction, Customer) - Method in class tp.impl.MyRM
 
queryReserved(Transaction, Customer) - Method in interface tp.RM
Get the bill for the customer return a string representation of reservations
queryReservedPrice(Transaction, Customer) - Method in class tp.impl.MyRM
 
queryReservedPrice(Transaction, Customer) - Method in interface tp.RM
Get the total amount of money the customer owes in this RM.
queryRoom(Transaction, String) - Method in class tp.impl.MyWC
 
queryRoom(Transaction, String) - Method in interface tp.WC
Get the number of rooms available.
queryRoomPrice(Transaction, String) - Method in class tp.impl.MyWC
 
queryRoomPrice(Transaction, String) - Method in interface tp.WC
Get the room price.

R

readyToServe() - Method in class tp.impl.CSEP545ServiceObject
IMPLEMENT THIS METHOD Bootstrapping completed and the server is up and running.
readyToServe() - Method in class tp.impl.MyRM
 
readyToServe() - Method in class tp.impl.MyTM
 
readyToServe() - Method in class tp.impl.MyWC
 
recovery() - Method in class tp.impl.CSEP545ServiceObject
IMPLEMENT THIS METHOD Run recovery algorithm and reconstruct the state of service before failure.
recovery() - Method in class tp.impl.MyRM
 
recovery() - Method in class tp.impl.MyTM
 
recovery() - Method in class tp.impl.MyWC
 
refresh() - Method in interface tp.impl.CSEP545Service
Refresh all remote references used by this service.
refresh() - Method in class tp.impl.MyRM
 
refresh() - Method in class tp.impl.MyTM
 
refresh() - Method in class tp.impl.MyWC
IMPLEMENT THIS METHOD if you want to implement a different service architecture.
register(String) - Method in class tp.impl.MyTM
look up RMI registry to cache remote reference of RM represented by rm.
register(String) - Method in interface tp.TM
A RM of which name is rm register itself so that later TM could coordinate for two-phase commit.
registry - Variable in class tp.impl.CSEP545ServiceObject
reference to RMI registry
reserve(Transaction, Customer, RID) - Method in class tp.impl.MyRM
 
reserve(Transaction, Customer, RID) - Method in interface tp.RM
reserve a resource i on behalf of customer c
reserveItinerary(Customer, String[], String, boolean, boolean) - Method in class tp.impl.MyWC
 
reserveItinerary(Customer, String[], String, boolean, boolean) - Method in interface tp.WC
Reserve an itinerary
RID - Class in tp
The class represents a resource identifier.
RID() - Constructor for class tp.RID
 
RID(RID.Type, String) - Constructor for class tp.RID
 
RID(int) - Constructor for class tp.RID
create identifier with flight number
RID.Type - Enum in tp
resource type
RM - Interface in tp
Resource Manager Interface

S

selfDestruct(int) - Method in class tp.impl.MyRM
 
selfDestruct(int) - Method in interface tp.RM
Exit (simulate a failure) after a specified number of disk writes.
ServiceID - Class in tp.impl
The class represents a service for Java project.
ServiceID() - Constructor for class tp.impl.ServiceID
 
ServiceID(CSEP545Service.Type) - Constructor for class tp.impl.ServiceID
 
ServiceID(CSEP545Service.Type, String) - Constructor for class tp.impl.ServiceID
 
setDeadlockTimeout(long) - Method in class tp.impl.MyLM
 
setDeadlockTimeout(long) - Method in interface tp.LM
Set deadlock timeout in millisecond.
shutdown() - Method in interface tp.impl.CSEP545Service
Gracefully shutdown target service.
shutdown() - Method in class tp.impl.CSEP545ServiceObject
 
shutdown() - Method in class tp.impl.MyRM
 
shutdown() - Method in class tp.impl.MyTM
 
start() - Method in class tp.impl.MyTM
 
start() - Method in class tp.impl.MyWC
 
start() - Method in interface tp.TM
start a new transaction
start() - Method in interface tp.WC
Start a transaction return a unique transaction ID
startUp() - Method in class tp.impl.CSEP545ServiceObject
IMPLEMENT THIS METHOD If you use extra threads in your service, start them in this method.
startUp() - Method in class tp.impl.MyRM
 
startUp() - Method in class tp.impl.MyTM
 
startUp() - Method in class tp.impl.MyWC
 
subsume(LM.LockType) - Method in enum tp.LM.LockType
check whether this lock type subsumes (is stronger) other lock type
svcid - Variable in class tp.impl.CSEP545ServiceObject
service identifier.

T

TM - Interface in tp
Transaction Manager Interface The default set of APIs except TM.register(String) is exposed to WC.
toString() - Method in class tp.Customer
 
toString() - Method in class tp.impl.ServiceID
 
toString() - Method in class tp.LockableID
 
toString() - Method in class tp.RID
 
toString() - Method in class tp.Transaction
 
tp - package tp
CSEP545 Final Project for Java
tp.client - package tp.client
This package includes all client codes.
tp.impl - package tp.impl
Please place your own code under this package.
Transaction - Class in tp
unique transaction identifier
Transaction() - Constructor for class tp.Transaction
 
Transaction(String) - Constructor for class tp.Transaction
 
Transaction(UUID) - Constructor for class tp.Transaction
 
TransactionAbortedException - Exception in tp
A problem occurred that caused the transaction to abort.
TransactionAbortedException(Transaction, String) - Constructor for exception tp.TransactionAbortedException
 
type - Variable in class tp.impl.ServiceID
 
type - Variable in class tp.RID
 

U

unlockAll(Transaction) - Method in class tp.impl.MyLM
 
unlockAll(Transaction) - Method in interface tp.LM
unlock all locks held by the transaction
unreserve(Transaction, Customer) - Method in class tp.impl.MyRM
 
unreserve(Transaction, Customer) - Method in interface tp.RM
drop all reserved resources for customer customer

V

valueOf(String) - Static method in enum tp.impl.CSEP545Service.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum tp.LM.LockType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum tp.RID.Type
Returns the enum constant of this type with the specified name.
values() - Static method in enum tp.impl.CSEP545Service.Type
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum tp.LM.LockType
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum tp.RID.Type
Returns an array containing the constants of this enum type, in the order they are declared.

W

WC - Interface in tp
Workflow Controller stub

A C D E F G H I K L M N P Q R S T U V W