Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for maybeUpdate (0.17 sec)

  1. subprojects/core/src/test/groovy/org/gradle/internal/scopeids/PersistentScopeIdLoaderTest.groovy

            then:
            1 * globalScopedCacheBuilderFactory.baseDirForCrossVersionCache("user-id.txt") >> storeFile
    
            and:
            1 * storeFactory.create(storeFile, _) >> store
    
            and:
            1 * store.maybeUpdate(_) >> { ObjectHolder.UpdateAction action ->
                action.update(null)
            }
    
            and:
            idFactory.create() >> newId
    
            and:
            id == newId
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jan 10 18:14:29 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/FileBackedObjectHolderTest.groovy

            1 * serializer.write(_, "a")
    
            when: // same value is not written
            def r = cache.maybeUpdate { it }
    
            then:
            r == "a"
            1 * serializer.read(_)
    
            and:
            0 * serializer.write(_, _)
    
            when: // different value is written back
            r = cache.maybeUpdate { "b" }
    
            then:
            1 * serializer.read(_)
    
            and:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/FileIntegrityViolationSuppressingObjectHolderDecorator.java

        public T update(final UpdateAction<T> updateAction) {
            return doUpdate(updateAction, () -> delegate.update(updateAction));
        }
    
        @Override
        public T maybeUpdate(final UpdateAction<T> updateAction) {
            return doUpdate(updateAction, () -> delegate.maybeUpdate(updateAction));
        }
    
        private T doUpdate(UpdateAction<T> updateAction, Supplier<T> work) {
            try {
                return work.get();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/ObjectHolder.java

         *
         * An exclusive lock is held while the update action is executing.
         * The result of the update is returned, which may not be the object returned by the update action.
         */
        T maybeUpdate(UpdateAction<T> updateAction);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  5. platforms/native/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/DefaultCompilationStateCacheFactory.java

            @Override
            public CompilationState update(UpdateAction<CompilationState> updateAction) {
                throw new UnsupportedOperationException();
            }
    
            @Override
            public CompilationState maybeUpdate(UpdateAction<CompilationState> updateAction) {
                throw new UnsupportedOperationException();
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 20:25:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/FileBackedObjectHolder.java

                    } else {
                        result = oldValue;
                    }
                }
            }
    
            MaybeUpdater maybeUpdater = new MaybeUpdater(updateAction);
            fileAccess.updateFile(maybeUpdater);
            return maybeUpdater.result;
        }
    
        private void serialize(T newValue) {
            try {
                if (!cacheFile.isFile()) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. subprojects/core/src/main/java/org/gradle/internal/scopeids/DefaultPersistentScopeIdLoader.java

            return buildTreeScopedCacheBuilderFactory;
        }
    
        private UniqueId get(ScopeParams params) {
            ObjectHolder<UniqueId> store = store(params);
    
            return store.maybeUpdate(new ObjectHolder.UpdateAction<UniqueId>() {
                @Override
                public UniqueId update(UniqueId oldValue) {
                    if (oldValue == null) {
                        return generator.create();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jan 10 18:14:29 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  8. platforms/native/language-native/src/test/groovy/org/gradle/language/nativeplatform/internal/incremental/IncrementalCompileProcessorTest.groovy

            CompilationState update(ObjectHolder.UpdateAction<CompilationState> updateAction) {
                throw new UnsupportedOperationException()
            }
    
            @Override
            CompilationState maybeUpdate(ObjectHolder.UpdateAction<CompilationState> updateAction) {
                throw new UnsupportedOperationException()
            }
        }
    
        class DummyResolver implements SourceIncludesResolver {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 15:31:28 UTC 2024
    - 13.7K bytes
    - Viewed (0)
Back to top