Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void apply(Key key, ValueUpdate update) throws java.io.IOException
                public override void apply(Key key, ValueUpdate update)
                {
                    // Apply to the postState first, so that if the postState needs to read the state from the preState
                    // it will read the value prior to this update, then subsequent updates to the postState will not
                    // have to read from preState, ensuring that each update is applied exactly once to both preState
                    // and postState, which together with the commutativity of updates ensures consistent outcomes.
                    _post.apply(key, update);
                    _pre.apply(key, update);
                }
Esempio n. 2
0
 public override void apply(object o, ValueUpdate update)
 {
 }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public abstract void apply(Key key, ValueUpdate update) throws java.io.IOException;
        public abstract void Apply(Key key, ValueUpdate update);
Esempio n. 4
0
 /// <summary>
 /// When combined with a "Value" bind, controls when the view model is updated
 /// </summary>
 /// <typeparam name="TModel"></typeparam>
 /// <param name="this"></param>
 /// <param name="valueUpdate"></param>
 /// <returns></returns>
 public static DataBindBuilder <TModel> ValueUpdate <TModel>(this DataBindBuilder <TModel> @this, ValueUpdate valueUpdate)
 {
     @this.Builder.Attr("data-bind", "valueUpdate", string.Format("'{0}'", valueUpdate.ToString().ToLowerInvariant()));
     return(@this);
 }
Esempio n. 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter") static <Key> void applyUpdate(ReadableState<Key> store, java.util.concurrent.ConcurrentMap<Key, ChangeEntry> changes, Key key, ValueUpdate update, boolean reset, long version) throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal static void ApplyUpdate <Key>(ReadableState <Key> store, ConcurrentMap <Key, ChangeEntry> changes, Key key, ValueUpdate update, bool reset, long version)
        {
            ChangeEntry value = changes.get(key);

            if (value == null)
            {
                ChangeEntry newEntry = ChangeEntry.Of(new sbyte[store.KeyFormat().valueSize()], version);
                lock ( newEntry )
                {
                    value = changes.putIfAbsent(key, newEntry);
                    if (value == null)
                    {
                        BigEndianByteArrayBuffer buffer = new BigEndianByteArrayBuffer(newEntry.Data);
                        if (!reset)
                        {
                            PreviousValue lookup = new PreviousValue(newEntry.Data);
                            if (!store.Lookup(key, lookup))
                            {
                                buffer.Clear();
                            }
                        }
                        update.Update(buffer);
                        return;
                    }
                }
            }
            lock ( value )
            {
                BigEndianByteArrayBuffer target = new BigEndianByteArrayBuffer(value.Data);
                value.Version = version;
                if (reset)
                {
                    target.Clear();
                }
                update.Update(target);
            }
        }
Esempio n. 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void apply(Key key, ValueUpdate update) throws java.io.IOException
            public override void apply(Key key, ValueUpdate update)
            {
                ensureOpen();
                ApplyUpdate(_outerInstance.store, _outerInstance.changes, key, update, true, _outerInstance.highestAppliedVersion.get());
            }
Esempio n. 7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void apply(Key key, ValueUpdate update) throws java.io.IOException
            public override void Apply(Key key, ValueUpdate update)
            {
                EnsureOpenOnSameThread();
                ApplyUpdate(Store, Changes, key, update, false, Version);
            }