DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Attributes | List of all members
Deveel.Data.Sql.Tables.VersionedTableIndexList Class Reference

Public Member Functions

 VersionedTableIndexList (TableSource tableSource)
 
void AddRegistry (TableEventRegistry registry)
 
bool MergeChanges (long commitId)
 
IEnumerable< TableEventRegistryFindSinceCommit (long commitId)
 

Properties

IDatabaseContext DatabaseContext [get]
 
TableSource TableSource [get, private set]
 
bool HasChangesPending [get]
 

Private Attributes

readonly List< TableEventRegistryeventRegistries
 

Detailed Description

Definition at line 24 of file VersionedTableIndexList.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Tables.VersionedTableIndexList.VersionedTableIndexList ( TableSource  tableSource)
inline

Definition at line 27 of file VersionedTableIndexList.cs.

27  {
28  TableSource = tableSource;
29 
30  eventRegistries = new List<TableEventRegistry>();
31  }
readonly List< TableEventRegistry > eventRegistries

Member Function Documentation

void Deveel.Data.Sql.Tables.VersionedTableIndexList.AddRegistry ( TableEventRegistry  registry)
inline

Definition at line 43 of file VersionedTableIndexList.cs.

43  {
44  eventRegistries.Add(registry);
45  }
readonly List< TableEventRegistry > eventRegistries
IEnumerable<TableEventRegistry> Deveel.Data.Sql.Tables.VersionedTableIndexList.FindSinceCommit ( long  commitId)
inline

Definition at line 64 of file VersionedTableIndexList.cs.

64  {
65  return eventRegistries.Where(x => x.CommitId >= commitId);
66  }
readonly List< TableEventRegistry > eventRegistries
bool Deveel.Data.Sql.Tables.VersionedTableIndexList.MergeChanges ( long  commitId)
inline

Definition at line 47 of file VersionedTableIndexList.cs.

47  {
48  // TODO: report the stat to the system
49 
50  while (eventRegistries.Count > 0) {
51  var registry = eventRegistries[0];
52 
53  if (commitId > registry.CommitId) {
54  // Remove the top registry from the list.
55  eventRegistries.RemoveAt(0);
56  } else {
57  return false;
58  }
59  }
60 
61  return true;
62  }
readonly List< TableEventRegistry > eventRegistries

Member Data Documentation

readonly List<TableEventRegistry> Deveel.Data.Sql.Tables.VersionedTableIndexList.eventRegistries
private

Definition at line 25 of file VersionedTableIndexList.cs.

Property Documentation

IDatabaseContext Deveel.Data.Sql.Tables.VersionedTableIndexList.DatabaseContext
get

Definition at line 33 of file VersionedTableIndexList.cs.

bool Deveel.Data.Sql.Tables.VersionedTableIndexList.HasChangesPending
get

Definition at line 39 of file VersionedTableIndexList.cs.

TableSource Deveel.Data.Sql.Tables.VersionedTableIndexList.TableSource
getprivate set

Definition at line 37 of file VersionedTableIndexList.cs.


The documentation for this class was generated from the following file: