Пример #1
0
        /// <summary>
        /// Create unique key map with specified order when map does not exist.
        /// Use specified write mode when writing map items.
        /// </summary>
        public MapPolicy(MapOrder order, MapWriteMode writeMode)
        {
            this.attributes = (int)order;

            switch (writeMode)
            {
            case MapWriteMode.UPDATE:
                itemCommand  = MapOperation.PUT;
                itemsCommand = MapOperation.PUT_ITEMS;
                break;

            case MapWriteMode.UPDATE_ONLY:
                itemCommand  = MapOperation.REPLACE;
                itemsCommand = MapOperation.REPLACE_ITEMS;
                break;

            case MapWriteMode.CREATE_ONLY:
                itemCommand  = MapOperation.ADD;
                itemsCommand = MapOperation.ADD_ITEMS;
                break;
            }
        }
Пример #2
0
        /// <summary>
        /// Create unique key map with specified order when map does not exist.
        /// Use specified write mode when writing map items.
        /// </summary>
        public MapPolicy(MapOrder order, MapWriteMode writeMode)
        {
            this.attributes = (int)order;

            switch (writeMode)
            {
                case MapWriteMode.UPDATE:
                    itemCommand = MapBase.PUT;
                    itemsCommand = MapBase.PUT_ITEMS;
                    break;

                case MapWriteMode.UPDATE_ONLY:
                    itemCommand = MapBase.REPLACE;
                    itemsCommand = MapBase.REPLACE_ITEMS;
                    break;

                case MapWriteMode.CREATE_ONLY:
                    itemCommand = MapBase.ADD;
                    itemsCommand = MapBase.ADD_ITEMS;
                    break;
            }
        }