MDISKManager

Purpose:

Keeps track of ALL minidisks residing on a specific DASD pack.

Properties:

List mdiskPool

Pool of MDISK's that belong to this MDISKManager. This should contain all MDISK's on one specific DASD pack as each DASD has an MDISKManager.

DASD myOwner

The DASD pack that the MDISKS represented by this Manager are located on.

Public Methods:

MDISK_Manager(String copyOfUserDirectory, DASD myOwner)

Creates a new MDISK_Manager. It then will use the copyOfUserDirectory to figure out which minidisks it needs to keep track of.

MDISK getMinidisk(String owner, String vaddr)

Searches its pool of MDISKs and returns the one with the specified owner and vaddr.

void createMDISK(MDISK newMDisk)

Should utilize a Guest object to add a directory entry to himself that will give him a minidisk.

void deleteMDISK(MDISK diskToDelete)

Should utilize a Guest object to remove a directory entry to himself that will give him a minidisk.

void transferMDISKOwnership(MDISK mdisk, Guest newOwner)

1. deleteMDISK(mdisk);

2. mdisk.setOwner(newOwner);

3. createMDISK(mdisk);

void changeMDISKAddress(MDISK mdisk, String newAddress)

1. deleteMDISK(mdisk);

2. mdisk.setVAddr(newAddress);

3. createMDISK(mdisk);

void copyMDISK(MDISK srcMdisk, DASD dstDASD, String dstVAddr, String newOwner)

1. dstMdisk = new MDISK(srcMdisk);

2. dstMdisk.dasd = dstDASD;

3. dstMdisk.owner = dstOwner;

4. dstMdisk.vaddr = dstVAddr;

5. dstDASD.mdiskMgr.createMDISK(dstMdisk);

6. executeMDISKCopyJob( srcMDISK, dstMDISK);

void moveMDISK(MDISK srcMdisk, DASD dstDASD)

1. copyMDISK(srcMDISK, dstDASD, tempVaddr, sameOwner)

2. deleteMDISK(srcMdisk)

3. changeMDISKAddress(newlyMadeMDISK, srcMdisk.vaddr);

Private Methods:

Notes:

Links to MDISKS are not updated!!!!

Data shred function?

LinkedList<MDISKS> getMinidisksByOwner(String owner)

does not make sense because a guests MDISKS may exist on more than one DASD.

2004-02-29T11:12:51