Class DefaultCloudServiceManager
- java.lang.Object
-
- de.dytanic.cloudnet.service.defaults.DefaultCloudServiceManager
-
- All Implemented Interfaces:
ICloudServiceManager
public final class DefaultCloudServiceManager extends java.lang.Object implements ICloudServiceManager
-
-
Constructor Summary
Constructors Constructor Description DefaultCloudServiceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddCloudServiceFactory(@NotNull ICloudServiceFactory factory)de.dytanic.cloudnet.common.concurrent.ITask<ICloudService>createCloudService(@NotNull de.dytanic.cloudnet.driver.service.ServiceConfiguration serviceConfiguration, @Nullable java.lang.Long timeoutMillis)voiddeleteAllCloudServices()@Nullable ICloudServicegetCloudService(@NotNull java.util.function.Predicate<ICloudService> predicate)@Nullable ICloudServicegetCloudService(@NotNull java.util.UUID uniqueId)@NotNull java.util.Collection<ICloudServiceFactory>getCloudServiceFactories()@NotNull java.util.Optional<ICloudServiceFactory>getCloudServiceFactory(java.lang.String runtime)@NotNull java.util.Map<java.util.UUID,ICloudService>getCloudServices()intgetCurrentReservedMemory()intgetCurrentUsedHeapMemory()@NotNull java.util.Map<java.util.UUID,de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot>getGlobalServiceInfoSnapshots()java.util.Collection<ICloudService>getLocalCloudServices()java.util.Collection<ICloudService>getLocalCloudServices(@NotNull java.lang.String taskName)java.util.Collection<ICloudService>getLocalCloudServices(@NotNull java.util.function.Predicate<ICloudService> predicate)@NotNull java.io.FilegetPersistenceServicesDirectory()@NotNull java.nio.file.PathgetPersistentServicesDirectoryPath()java.util.Collection<java.lang.Integer>getReservedTaskIds(@NotNull java.lang.String task)@NotNull java.io.FilegetTempDirectory()@NotNull java.nio.file.PathgetTempDirectoryPath()booleanhandleServiceUpdate(@NotNull de.dytanic.cloudnet.driver.network.def.packet.PacketClientServerServiceInfoPublisher.PublisherType type, @NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot snapshot)voidprepareServiceConfiguration(NodeServer server, de.dytanic.cloudnet.driver.service.ServiceConfiguration configuration)voidremoveCloudServiceFactory(@NotNull ICloudServiceFactory factory)voidremoveCloudServiceFactory(@NotNull java.lang.String runtime)ICloudServicerunTask(@NotNull de.dytanic.cloudnet.driver.service.ServiceConfiguration serviceConfiguration)Deprecated.voidstartAllCloudServices()voidstopAllCloudServices()-
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.service.ICloudServiceManager
createCloudService, getCloudServices, getCloudServices, getServices
-
-
-
-
Method Detail
-
runTask
@Deprecated @ScheduledForRemoval public ICloudService runTask(@NotNull @NotNull de.dytanic.cloudnet.driver.service.ServiceConfiguration serviceConfiguration)
Deprecated.- Specified by:
runTaskin interfaceICloudServiceManager
-
createCloudService
@Internal public de.dytanic.cloudnet.common.concurrent.ITask<ICloudService> createCloudService(@NotNull @NotNull de.dytanic.cloudnet.driver.service.ServiceConfiguration serviceConfiguration, @Nullable @Nullable java.lang.Long timeoutMillis)
- Specified by:
createCloudServicein interfaceICloudServiceManager
-
startAllCloudServices
public void startAllCloudServices()
- Specified by:
startAllCloudServicesin interfaceICloudServiceManager
-
stopAllCloudServices
public void stopAllCloudServices()
- Specified by:
stopAllCloudServicesin interfaceICloudServiceManager
-
deleteAllCloudServices
public void deleteAllCloudServices()
- Specified by:
deleteAllCloudServicesin interfaceICloudServiceManager
-
getCloudService
@Nullable public @Nullable ICloudService getCloudService(@NotNull @NotNull java.util.UUID uniqueId)
- Specified by:
getCloudServicein interfaceICloudServiceManager
-
getCloudService
@Nullable public @Nullable ICloudService getCloudService(@NotNull @NotNull java.util.function.Predicate<ICloudService> predicate)
- Specified by:
getCloudServicein interfaceICloudServiceManager
-
getLocalCloudServices
public java.util.Collection<ICloudService> getLocalCloudServices(@NotNull @NotNull java.lang.String taskName)
- Specified by:
getLocalCloudServicesin interfaceICloudServiceManager
-
getLocalCloudServices
public java.util.Collection<ICloudService> getLocalCloudServices(@NotNull @NotNull java.util.function.Predicate<ICloudService> predicate)
- Specified by:
getLocalCloudServicesin interfaceICloudServiceManager
-
getLocalCloudServices
public java.util.Collection<ICloudService> getLocalCloudServices()
- Specified by:
getLocalCloudServicesin interfaceICloudServiceManager
-
getReservedTaskIds
public java.util.Collection<java.lang.Integer> getReservedTaskIds(@NotNull @NotNull java.lang.String task)- Specified by:
getReservedTaskIdsin interfaceICloudServiceManager
-
getCurrentUsedHeapMemory
public int getCurrentUsedHeapMemory()
- Specified by:
getCurrentUsedHeapMemoryin interfaceICloudServiceManager
-
getCurrentReservedMemory
public int getCurrentReservedMemory()
- Specified by:
getCurrentReservedMemoryin interfaceICloudServiceManager
-
getTempDirectory
@NotNull public @NotNull java.io.File getTempDirectory()
- Specified by:
getTempDirectoryin interfaceICloudServiceManager
-
getTempDirectoryPath
@NotNull public @NotNull java.nio.file.Path getTempDirectoryPath()
- Specified by:
getTempDirectoryPathin interfaceICloudServiceManager
-
getPersistenceServicesDirectory
@NotNull public @NotNull java.io.File getPersistenceServicesDirectory()
- Specified by:
getPersistenceServicesDirectoryin interfaceICloudServiceManager
-
getPersistentServicesDirectoryPath
@NotNull public @NotNull java.nio.file.Path getPersistentServicesDirectoryPath()
- Specified by:
getPersistentServicesDirectoryPathin interfaceICloudServiceManager
-
getGlobalServiceInfoSnapshots
@NotNull public @NotNull java.util.Map<java.util.UUID,de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot> getGlobalServiceInfoSnapshots()
- Specified by:
getGlobalServiceInfoSnapshotsin interfaceICloudServiceManager
-
getCloudServices
@NotNull public @NotNull java.util.Map<java.util.UUID,ICloudService> getCloudServices()
- Specified by:
getCloudServicesin interfaceICloudServiceManager
-
getCloudServiceFactories
@NotNull public @NotNull java.util.Collection<ICloudServiceFactory> getCloudServiceFactories()
- Specified by:
getCloudServiceFactoriesin interfaceICloudServiceManager
-
getCloudServiceFactory
@NotNull public @NotNull java.util.Optional<ICloudServiceFactory> getCloudServiceFactory(java.lang.String runtime)
- Specified by:
getCloudServiceFactoryin interfaceICloudServiceManager
-
addCloudServiceFactory
public void addCloudServiceFactory(@NotNull @NotNull ICloudServiceFactory factory)- Specified by:
addCloudServiceFactoryin interfaceICloudServiceManager
-
removeCloudServiceFactory
public void removeCloudServiceFactory(@NotNull @NotNull ICloudServiceFactory factory)- Specified by:
removeCloudServiceFactoryin interfaceICloudServiceManager
-
removeCloudServiceFactory
public void removeCloudServiceFactory(@NotNull @NotNull java.lang.String runtime)- Specified by:
removeCloudServiceFactoryin interfaceICloudServiceManager
-
handleServiceUpdate
public boolean handleServiceUpdate(@NotNull de.dytanic.cloudnet.driver.network.def.packet.PacketClientServerServiceInfoPublisher.PublisherType type, @NotNull @NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot snapshot)- Specified by:
handleServiceUpdatein interfaceICloudServiceManager
-
prepareServiceConfiguration
@Internal public void prepareServiceConfiguration(NodeServer server, de.dytanic.cloudnet.driver.service.ServiceConfiguration configuration)
-
-