Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class MVCMutex

    Object
       |
       +--GrvObject
             |
             +--MVCMutex

class MVCMutex
extends GrvObject

This class encapsulates a Map of mutual exclusion data; It self-registers instantiations into a static Map; This class implements Lamport's bakery algorithm for mutual exclusion; It is used to execute Command objects while making sure that no other Command objects (that are using Mutex) are executed at the same time.

NOTE: our main use for this is to keep background AJAX processing from confusing foreground UI processing, which can otherwise occur because both are making data model changes simultaneously.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in grvMVC.js

Field Summary
`<static> Object` | `Map`

Constructor Summary
`MVCMutex ()`

Method Summary
`void` | `cpuSlice( <int> optStartID )` continue the processing of "this" mutex/command object
`void` | `invoke()` launch the processing of "this" mutex/command object
`void` | `konstructor( <Command> cmdObj, <String> methodName, <boolean> optInhibitInvoke )`
`<static> void` | `CpuSlice( <int> cmdID, <int> optStartID )` Static method to give a slice of CPU to mutex with given ID

Methods inherited from class GrvObject
`souper`

Field Detail

### Map

    <static> Object Map

Constructor Detail

### MVCMutex

    MVCMutex()

Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Method Detail

### cpuSlice

    void cpuSlice( <int> optStartID )

continue the processing of "this" mutex/command object

Parameters:

`optStartID` - optional ID of last command we were waiting on; if not specified then start at top of list of all pending mutex/commands.

See:

- CpuSlice()

### invoke

    void invoke()

launch the processing of "this" mutex/command object

### konstructor

    void konstructor( <Command> cmdObj, <String> methodName, <boolean> optInhibitInvoke )

Parameters:

`cmdObj` - Command object to be wrapped in Mutex

`methodName` - name of method being run on cmdObj

`optInhibitInvoke` - optional flag that if true will inhibit immediate launching of cmdObj by this constructor

### CpuSlice

    <static> void CpuSlice( <int> cmdID, <int> optStartID )

Static method to give a slice of CPU to mutex with given ID

Parameters:

`cmdID` - ID of command to resume

`optStartID` - optional ID of command on which we are waiting; if not specified then start at top of list of all pending commands.

Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Sun Feb 11 13:31:25 2007