@Test public void set() { Set<String> keys = new HashSet<>(); keys.add("testKey1"); keys.add("testKey2"); propagationByResource.set(ResourceOperation.CREATE, Set.of()); assertEquals(Set.of(), ReflectionTestUtils.getField(propagationByResource, "toBeCreated")); propagationByResource.set(ResourceOperation.CREATE, keys); assertEquals(keys, ReflectionTestUtils.getField(propagationByResource, "toBeCreated")); propagationByResource.set(ResourceOperation.UPDATE, keys); assertEquals(keys, ReflectionTestUtils.getField(propagationByResource, "toBeUpdated")); propagationByResource.set(ResourceOperation.DELETE, keys); assertEquals(keys, ReflectionTestUtils.getField(propagationByResource, "toBeDeleted")); }
public final void set(final ResourceOperation type, final Collection<T> keys) { switch (type) { case CREATE: toBeCreated.clear(); toBeCreated.addAll(keys); break; case UPDATE: toBeUpdated.clear(); toBeUpdated.addAll(keys); break; case DELETE: toBeDeleted.clear(); toBeDeleted.addAll(keys); break; default: } }
PropagationByResource implements Serializable { public final void set(final ResourceOperation type, final Collection<T> keys) { switch (type) { case CREATE: toBeCreated.clear(); toBeCreated.addAll(keys); break; case UPDATE: toBeUpdated.clear(); toBeUpdated.addAll(keys); break; case DELETE: toBeDeleted.clear(); toBeDeleted.addAll(keys); break; default: } } }
PropagationByResource implements Serializable { public final void set(final ResourceOperation type, final Collection<T> keys) { switch (type) { case CREATE: toBeCreated.clear(); toBeCreated.addAll(keys); break; case UPDATE: toBeUpdated.clear(); toBeUpdated.addAll(keys); break; case DELETE: toBeDeleted.clear(); toBeDeleted.addAll(keys); break; default: } } PropagationByResource(); }
PropagationByResource implements Serializable { public final void set(final ResourceOperation type, final Collection<T> keys) { switch (type) { case CREATE: toBeCreated.clear(); toBeCreated.addAll(keys); break; case UPDATE: toBeUpdated.clear(); toBeUpdated.addAll(keys); break; case DELETE: toBeDeleted.clear(); toBeDeleted.addAll(keys); break; default: } } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString(); }
PropagationByResource implements Serializable { public final void set(final ResourceOperation type, final Collection<T> keys) { switch (type) { case CREATE: toBeCreated.clear(); toBeCreated.addAll(keys); break; case UPDATE: toBeUpdated.clear(); toBeUpdated.addAll(keys); break; case DELETE: toBeDeleted.clear(); toBeDeleted.addAll(keys); break; default: } } PropagationByResource(); final void purge(); final boolean add(final ResourceOperation type, final T key); boolean addAll(final ResourceOperation type, final Collection<T> keys); final boolean remove(final ResourceOperation type, final T key); boolean removeAll(final ResourceOperation type, final Set<T> keys); boolean removeAll(final Collection<T> keys); boolean retainAll(final Collection<T> keys); boolean contains(final ResourceOperation type, final T key); boolean contains(final T key); final Set<T> get(final ResourceOperation type); Map<T, ResourceOperation> asMap(); final void set(final ResourceOperation type, final Collection<T> keys); final void merge(final PropagationByResource<T> propByRes); void clear(); final boolean isEmpty(); Map<String, String> getOldConnObjectKeys(); String getOldConnObjectKey(final String resourceKey); void addOldConnObjectKey(final String resourceKey, final String oldConnObjectKey); @Override String toString();  }