congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
HollowFilesystemBlobStorageCleaner.sortByLastModified
Code IndexAdd Tabnine to your IDE (free)

How to use
sortByLastModified
method
in
com.netflix.hollow.api.producer.fs.HollowFilesystemBlobStorageCleaner

Best Java code snippets using com.netflix.hollow.api.producer.fs.HollowFilesystemBlobStorageCleaner.sortByLastModified (Showing top 1 results out of 315)

origin: Netflix/hollow

/**
 * Cleans snapshot to keep the last 'n' snapshots. Defaults to 5.
 */
@Override
public void cleanSnapshots() {
  File[] files = getFilesByType(HollowProducer.Blob.Type.SNAPSHOT.prefix);
  if(files == null || files.length <= numOfSnapshotsToKeep) {
    return;
  }
  sortByLastModified(files);
  for(int i= numOfSnapshotsToKeep; i < files.length; i++){
    File file = files[i];
    boolean deleted = file.delete();
    if(!deleted) {
      log.warning("Could not delete snapshot " + file.getPath());
    }
  }
}
com.netflix.hollow.api.producer.fsHollowFilesystemBlobStorageCleanersortByLastModified

Popular methods of HollowFilesystemBlobStorageCleaner

  • <init>
  • getFilesByType

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now