示例#1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.neo4j.helpers.collection.Pair<java.io.File, KeyValueStoreFile> initialState(DataInitializer<EntryUpdater<Key>> initializer) throws java.io.IOException
            internal virtual Pair <File, KeyValueStoreFile> InitialState(DataInitializer <EntryUpdater <Key> > initializer)
            {
                long version = initializer.InitialVersion();

                using (ActiveState <Key> creation = StateFactory.open(ReadableState.Empty(KeyFormat(), version), null, VersionContextSupplier))
                {
                    try (EntryUpdater <Key> updater = creation.resetter(new ReentrantLock(), () =>
                        {
                        }
                                                                        ))
                        {
                            initializer.Initialize(updater);
                        }
                    return(Rotation.create(KeyFormat().filter(creation.dataProvider()), initializer.InitialVersion()));
                }
            }
示例#2
0
 public PrototypeState(ActiveState <Key> store)
 {
     this.Store = store;
 }
示例#3
0
 internal Prepared(ActiveState <Key> state) : base(state.KeyFormat(), state.Factory(), state.VersionContextSupplier)
 {
     this.State = state;
 }
示例#4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public NeedsCreation<Key> apply(ActiveState<Key> keyActiveState) throws RuntimeException
            public override NeedsCreation <Key> Apply(ActiveState <Key> keyActiveState)
            {
                return(this);
            }
示例#5
0
 internal Rotation(ActiveState <Key> preState, PrototypeState <Key> postState, long version)
 {
     this.PreState  = preState;
     this.PostState = postState;
     this.Threshold = version;
 }