Class ClusterSynchronizedTemplateStorage

  • All Implemented Interfaces:
    de.dytanic.cloudnet.common.INameable, de.dytanic.cloudnet.driver.template.TemplateStorage, java.lang.AutoCloseable
    Direct Known Subclasses:
    LocalTemplateStorage

    public abstract class ClusterSynchronizedTemplateStorage
    extends de.dytanic.cloudnet.driver.template.defaults.DefaultSyncTemplateStorage
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable java.io.OutputStream appendOutputStream​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract java.io.OutputStream appendOutputStreamWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean create​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean createDirectory​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract boolean createDirectoryWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      boolean createFile​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract boolean createFileWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract boolean createWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean delete​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean deleteFile​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract boolean deleteFileWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract boolean deleteWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)  
      boolean deploy​(@NotNull java.io.InputStream inputStream, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)  
      boolean deploy​(@NotNull java.nio.file.Path directory, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target, @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)  
      abstract boolean deployWithoutSynchronization​(@NotNull java.io.InputStream inputStream, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)  
      abstract boolean deployWithoutSynchronization​(@NotNull java.nio.file.Path directory, @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target, @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)  
      @Nullable java.io.OutputStream newOutputStream​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      abstract java.io.OutputStream newOutputStreamWithoutSynchronization​(@NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template, @NotNull java.lang.String path)  
      protected boolean requiresSynchronization()  
      void toggleSynchronization​(boolean enabled)  
      • Methods inherited from class de.dytanic.cloudnet.driver.template.defaults.DefaultSyncTemplateStorage

        appendOutputStreamAsync, asZipInputStreamAsync, closeAsync, copyAsync, createAsync, createDirectoryAsync, createFileAsync, deleteAsync, deleteFileAsync, deployAsync, deployAsync, deployAsync, getFileInfoAsync, getTemplatesAsync, hasAsync, hasFileAsync, listFilesAsync, listFilesAsync, newInputStreamAsync, newOutputStreamAsync, zipTemplateAsync
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface de.dytanic.cloudnet.common.INameable

        getName
      • Methods inherited from interface de.dytanic.cloudnet.driver.template.TemplateStorage

        asZipInputStream, close, copy, deploy, getFileInfo, getTemplates, has, hasFile, listFiles, listFiles, listFiles, listFiles, listFilesAsync, listFilesAsync, newInputStream, zipTemplate
    • Constructor Detail

      • ClusterSynchronizedTemplateStorage

        public ClusterSynchronizedTemplateStorage()
    • Method Detail

      • toggleSynchronization

        public void toggleSynchronization​(boolean enabled)
      • requiresSynchronization

        protected boolean requiresSynchronization()
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.nio.file.Path directory,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target,
                              @Nullable
                              @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)
      • deployWithoutSynchronization

        public abstract boolean deployWithoutSynchronization​(@NotNull
                                                             @NotNull java.nio.file.Path directory,
                                                             @NotNull
                                                             @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target,
                                                             @Nullable
                                                             @Nullable java.util.function.Predicate<java.nio.file.Path> fileFilter)
      • deploy

        public boolean deploy​(@NotNull
                              @NotNull java.io.InputStream inputStream,
                              @NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
      • deployWithoutSynchronization

        public abstract boolean deployWithoutSynchronization​(@NotNull
                                                             @NotNull java.io.InputStream inputStream,
                                                             @NotNull
                                                             @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate target)
      • delete

        public boolean delete​(@NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
      • deleteWithoutSynchronization

        public abstract boolean deleteWithoutSynchronization​(@NotNull
                                                             @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
      • create

        public boolean create​(@NotNull
                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
      • createWithoutSynchronization

        public abstract boolean createWithoutSynchronization​(@NotNull
                                                             @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template)
      • appendOutputStream

        @Nullable
        public @Nullable java.io.OutputStream appendOutputStream​(@NotNull
                                                                 @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                 @NotNull
                                                                 @NotNull java.lang.String path)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • appendOutputStreamWithoutSynchronization

        public abstract java.io.OutputStream appendOutputStreamWithoutSynchronization​(@NotNull
                                                                                      @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                      @NotNull
                                                                                      @NotNull java.lang.String path)
                                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • newOutputStream

        @Nullable
        public @Nullable java.io.OutputStream newOutputStream​(@NotNull
                                                              @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                              @NotNull
                                                              @NotNull java.lang.String path)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • newOutputStreamWithoutSynchronization

        public abstract java.io.OutputStream newOutputStreamWithoutSynchronization​(@NotNull
                                                                                   @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                                   @NotNull
                                                                                   @NotNull java.lang.String path)
                                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • createFile

        public boolean createFile​(@NotNull
                                  @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                  @NotNull
                                  @NotNull java.lang.String path)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • createFileWithoutSynchronization

        public abstract boolean createFileWithoutSynchronization​(@NotNull
                                                                 @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                 @NotNull
                                                                 @NotNull java.lang.String path)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • createDirectory

        public boolean createDirectory​(@NotNull
                                       @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                       @NotNull
                                       @NotNull java.lang.String path)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • createDirectoryWithoutSynchronization

        public abstract boolean createDirectoryWithoutSynchronization​(@NotNull
                                                                      @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                      @NotNull
                                                                      @NotNull java.lang.String path)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteFile

        public boolean deleteFile​(@NotNull
                                  @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                  @NotNull
                                  @NotNull java.lang.String path)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteFileWithoutSynchronization

        public abstract boolean deleteFileWithoutSynchronization​(@NotNull
                                                                 @NotNull de.dytanic.cloudnet.driver.service.ServiceTemplate template,
                                                                 @NotNull
                                                                 @NotNull java.lang.String path)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException