All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.storage.repository.RepositoryWriter Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
package com.arextest.storage.repository;

import com.arextest.model.mock.MockCategoryType;
import com.arextest.model.mock.Mocker;
import java.util.Date;
import java.util.List;

/**
 * @author jmo
 * @since 2021/11/7
 */
public interface RepositoryWriter {

  boolean save(T value);

  boolean saveList(List valueList);

  long removeBy(MockCategoryType categoryType, String recordId);

  /**
   * To extend all mockers of the given category type and record id to the given expire time.
   * @param categoryType the category type of the mockers to be extended
   * @param recordId the record id of the mockers to be extended
   * @param expireTime the expiration time to be extended to
   * @return document count of the mockers extended
   */
  long extendExpirationTo(MockCategoryType categoryType, String recordId, Date expireTime);

  boolean update(T value);

  long removeByAppId(MockCategoryType categoryType, String appId);

  long removeByOperationNameAndAppId(MockCategoryType categoryType, String operationName,
      String appId);

  long removeById(MockCategoryType categoryType, String id);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy