//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public synchronized void shutdown() throws java.io.IOException public override void Shutdown() { lock (this) { _currentStoreChannel.Dispose(); _currentStoreChannel = null; } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private static void writeHeader(org.neo4j.io.fs.FileSystemAbstraction fileSystem, java.io.File file, SegmentHeader header) throws java.io.IOException private static void WriteHeader(FileSystemAbstraction fileSystem, File file, SegmentHeader header) { using (StoreChannel channel = fileSystem.Open(file, OpenMode.READ_WRITE)) { channel.Position(0); PhysicalFlushableChannel writer = new PhysicalFlushableChannel(channel, SegmentHeader.Size); _headerMarshal.marshal(header, writer); writer.PrepareForFlush().flush(); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void ensureExists(java.io.File file) throws java.io.IOException private void EnsureExists(File file) { if (!_fsa.fileExists(file)) { _fsa.mkdirs(file.ParentFile); using (FlushableChannel channel = new PhysicalFlushableChannel(_fsa.create(file))) { _marshal.marshal(_marshal.startState(), channel); } } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void recover() throws java.io.IOException private void Recover() { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.causalclustering.core.state.StateRecoveryManager.RecoveryStatus<STATE> recoveryStatus = recoveryManager.recover(fileA, fileB); StateRecoveryManager.RecoveryStatus <STATE> recoveryStatus = _recoveryManager.recover(_fileA, _fileB); this._currentStoreFile = recoveryStatus.ActiveFile(); this._currentStoreChannel = ResetStoreFile(_currentStoreFile); this._initialState = recoveryStatus.RecoveredState(); _log.info("%s state restored, up to ordinal %d", _name, _marshal.ordinal(_initialState)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: void switchStoreFile() throws java.io.IOException internal virtual void SwitchStoreFile() { _currentStoreChannel.Dispose(); if (_currentStoreFile.Equals(_fileA)) { _currentStoreChannel = ResetStoreFile(_fileB); _currentStoreFile = _fileB; } else { _currentStoreChannel = ResetStoreFile(_fileA); _currentStoreFile = _fileA; } }
/// <summary> /// Idempotently closes the writer. /// </summary> internal virtual void CloseWriter() { lock (this) { if (_bufferedWriter != null) { try { Flush(); _bufferedWriter.Dispose(); } catch (IOException e) { _log.error("Failed to close writer for: " + _file, e); } _bufferedWriter = null; _refCount.decrease(); } } }
public PositionAwarePhysicalFlushableChannel(LogVersionedStoreChannel logVersionedStoreChannel, int bufferSize) { this._logVersionedStoreChannel = logVersionedStoreChannel; this._channel = new PhysicalFlushableChannel(logVersionedStoreChannel, bufferSize); }
public PositionAwarePhysicalFlushableChannel(LogVersionedStoreChannel logVersionedStoreChannel) { this._logVersionedStoreChannel = logVersionedStoreChannel; this._channel = new PhysicalFlushableChannel(logVersionedStoreChannel); }