C# 클래스 fCraft.BlockDB

Database of block changes. Each BlockDB object is associated with a world. Provides controls for storage/retention, and methods to look up data.
상속: IDisposable
파일 보기 프로젝트 열기: GlennMR/800craft 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddEntry void
BlockDB System
CacheClear void
CheckAlignment void
CountNewerEntries int
EnforceLimit void
EnforceTimeLimit void
EnsureCapacity void
Flush void
Init void
LimitCapacity void
Lookup fCraft.BlockDBEntry[]
OnPlayerPlacedBlock void
OpenAppend System.IO.FileStream
OpenRead System.IO.FileStream
Preload void
TrimFile void

공개 메소드들

메소드 설명
AutoToggleIfNeeded ( ) : bool

If EnabledState is set to Auto, calling this auto-enables / auto-disables BlockDB depending on world's BuildSecurity.MinRank and BlockDBAutoEnableRank config key.

Clear ( ) : void

Clears cache and deletes the .fbdb file.

GetReadLock ( ) : IDisposable

Acquires and returns a shared (read) lock for this BlockDB. Disposing the object returned by this method releases the lock.

GetWriteLock ( ) : IDisposable

Acquires and returns an exclusive (write) lock for this BlockDB. Disposing the object returned by this method releases the lock.

LoadSettings ( System.Xml.Linq.XElement el ) : void
Lookup ( int max ) : fCraft.BlockDBEntry[]
Lookup ( int max, System.TimeSpan span ) : fCraft.BlockDBEntry[]
Lookup ( int max, Vector3I coords ) : fCraft.BlockDBEntry[]

Returns list of all changes done to the map at the given coordinate, newest to oldest.

Lookup ( int max, [ area ) : fCraft.BlockDBEntry[]
Lookup ( int max, [ area, System.TimeSpan span ) : fCraft.BlockDBEntry[]
Lookup ( int max, [ area, [ info, bool exclude ) : fCraft.BlockDBEntry[]
Lookup ( int max, [ area, [ info, bool exclude, System.TimeSpan span ) : fCraft.BlockDBEntry[]
Lookup ( int max, [ info, bool exclude ) : fCraft.BlockDBEntry[]
Lookup ( int max, [ info, bool exclude, System.TimeSpan span ) : fCraft.BlockDBEntry[]
SaveSettings ( ) : System.Xml.Linq.XElement
SaveSettings ( string rootName ) : System.Xml.Linq.XElement
Traverse ( [ processor ) : void

Traverses the database, newest to oldest entries, processing each entry with the given IBlockDBQueryProcessor.

비공개 메소드들

메소드 설명
AddEntry ( BlockDBEntry item ) : void
BlockDB ( [ world ) : System
CacheClear ( ) : void
CheckAlignment ( ) : void
CountNewerEntries ( System.TimeSpan age ) : int

Counts entries that are newer than the given age.

EnforceLimit ( ) : void
EnforceTimeLimit ( ) : void
EnsureCapacity ( int min ) : void
Flush ( bool enforceLimits ) : void
Init ( ) : void
LimitCapacity ( int max ) : void
Lookup ( int max, BlockDBSearchType searchType, bool>.[ selector ) : fCraft.BlockDBEntry[]
OnPlayerPlacedBlock ( object sender, [ e ) : void
OpenAppend ( ) : FileStream
OpenRead ( ) : FileStream
Preload ( ) : void
TrimFile ( int maxCapacity ) : void

메소드 상세

AutoToggleIfNeeded() 공개 메소드

If EnabledState is set to Auto, calling this auto-enables / auto-disables BlockDB depending on world's BuildSecurity.MinRank and BlockDBAutoEnableRank config key.
public AutoToggleIfNeeded ( ) : bool
리턴 bool

Clear() 공개 메소드

Clears cache and deletes the .fbdb file.
public Clear ( ) : void
리턴 void

GetReadLock() 공개 메소드

Acquires and returns a shared (read) lock for this BlockDB. Disposing the object returned by this method releases the lock.
public GetReadLock ( ) : IDisposable
리턴 IDisposable

GetWriteLock() 공개 메소드

Acquires and returns an exclusive (write) lock for this BlockDB. Disposing the object returned by this method releases the lock.
public GetWriteLock ( ) : IDisposable
리턴 IDisposable

LoadSettings() 공개 메소드

public LoadSettings ( System.Xml.Linq.XElement el ) : void
el System.Xml.Linq.XElement
리턴 void

Lookup() 공개 메소드

public Lookup ( int max ) : fCraft.BlockDBEntry[]
max int
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, System.TimeSpan span ) : fCraft.BlockDBEntry[]
max int
span System.TimeSpan
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

Returns list of all changes done to the map at the given coordinate, newest to oldest.
Given coordinates are outside the map.
public Lookup ( int max, Vector3I coords ) : fCraft.BlockDBEntry[]
max int Maximum number of changes to return.
coords Vector3I Coordinate to search at.
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ area ) : fCraft.BlockDBEntry[]
max int
area [
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ area, System.TimeSpan span ) : fCraft.BlockDBEntry[]
max int
area [
span System.TimeSpan
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ area, [ info, bool exclude ) : fCraft.BlockDBEntry[]
max int
area [
info [
exclude bool
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ area, [ info, bool exclude, System.TimeSpan span ) : fCraft.BlockDBEntry[]
max int
area [
info [
exclude bool
span System.TimeSpan
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ info, bool exclude ) : fCraft.BlockDBEntry[]
max int
info [
exclude bool
리턴 fCraft.BlockDBEntry[]

Lookup() 공개 메소드

public Lookup ( int max, [ info, bool exclude, System.TimeSpan span ) : fCraft.BlockDBEntry[]
max int
info [
exclude bool
span System.TimeSpan
리턴 fCraft.BlockDBEntry[]

SaveSettings() 공개 메소드

public SaveSettings ( ) : System.Xml.Linq.XElement
리턴 System.Xml.Linq.XElement

SaveSettings() 공개 메소드

public SaveSettings ( string rootName ) : System.Xml.Linq.XElement
rootName string
리턴 System.Xml.Linq.XElement

Traverse() 공개 메소드

Traverses the database, newest to oldest entries, processing each entry with the given IBlockDBQueryProcessor.
processor is null. BlockDB is disabled. The end of FBDB file is reached prematurely (corrupted file, or outside interference). FBDB file is not aligned to 20 bytes (likely corrupted). An I/O error occurrs while trying to read FBDB file from disk.
public Traverse ( [ processor ) : void
processor [ Processor to use for each BlockDBEntry.
리턴 void