var pManager = new PageManager (); pManager.timeoutHandler(); function PageManager () { var ret = (function(self) { return function() { self.timeoutHandler(); }; })(this); this.timeoutHandler = function () { $.ajax ({ url: '/echo/json/', type: 'post', cache: false, success: function (data) { setTimeout (ret, 750); } }); }; }
function PageManager () { var callback = (function(self) { return function() { self.timeoutHandler(); }; })(this); // only one callback this.timeoutHandler = function () { $.ajax ({ url: '/echo/json/', type: 'post', cache: false, data: {a:Math.random() }, success: function (data) { //var xmlDoc = $($.parseXML (data)); // Processing of XML //alert("data"); setTimeout (callback, 750); } }); }; } var pm = new PageManager (); pm.timeoutHandler();
/** * Creates a record manager for the indicated file * * @throws IOException when the file cannot be opened or is not * a valid file content-wise. */ public BaseRecordManager( String filename ) throws IOException { recordFile = new RecordFile( filename ); pageMgr = new PageManager( recordFile ); physMgr = new PhysicalRowIdManager( pageMgr ); logMgr = new LogicalRowIdManager( pageMgr ); lockElements = new ConcurrentHashMap<Long, LockElement>(); }
/** * Creates a record manager for the indicated file * * @throws IOException when the file cannot be opened or is not * a valid file content-wise. */ public BaseRecordManager( String filename ) throws IOException { recordFile = new RecordFile( filename ); pageMgr = new PageManager( recordFile ); physMgr = new PhysicalRowIdManager( pageMgr ); logMgr = new LogicalRowIdManager( pageMgr ); }
/** * Creates a record manager for the indicated file * * @throws IOException when the file cannot be opened or is not * a valid file content-wise. */ public BaseRecordManager( String filename ) throws IOException { recordFile = new RecordFile( filename ); pageMgr = new PageManager( recordFile ); physMgr = new PhysicalRowIdManager( recordFile, pageMgr ); logMgr = new LogicalRowIdManager( recordFile, pageMgr ); }
private void reopen() throws IOException { _physFileFree = new RecordFile( _filename + DBF, FREE_BLOCK_SIZE); _physPagemanFree = new PageManager(_physFileFree); _physFile = new RecordFile( _filename + DBR, DATA_BLOCK_SIZE); _physPageman = new PageManager( _physFile ); _physMgr = new PhysicalRowIdManager( _physFile, _physPageman, new FreePhysicalRowIdPageManager(_physFileFree, _physPagemanFree)); _logicFileFree= new RecordFile( _filename +IDF,FREE_BLOCK_SIZE ); _logicPagemanFree = new PageManager( _logicFileFree ); if(TRANS_BLOCK_SIZE>256*8) throw new InternalError(); //to big page, slot number would not fit into page _logicFile = new RecordFile( _filename +IDR,TRANS_BLOCK_SIZE ); _logicPageman = new PageManager( _logicFile ); _logicMgr = new LogicalRowIdManager( _logicFile, _logicPageman, new FreeLogicalRowIdPageManager(_logicFileFree, _logicPagemanFree)); long versionNumber = getRoot(STORE_VERSION_NUMBER_ROOT); if(versionNumber>STORE_FORMAT_VERSION) throw new IOException("Unsupported version of store. Please update JDBM. Minimal supported ver:"+STORE_FORMAT_VERSION+", store ver:"+versionNumber); setRoot(STORE_VERSION_NUMBER_ROOT, STORE_FORMAT_VERSION); }