Package com.linkedin.venice.service
Class AbstractVeniceService
- java.lang.Object
-
- com.linkedin.venice.service.AbstractVeniceService
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractKafkaConsumerService
,AbstractStoreBufferService
,AdminConsumerService
,AdminSparkServer
,AggKafkaConsumerService
,BackupVersionOptimizationService
,DictionaryRetrievalService
,DisabledPartitionEnablerService
,DiskHealthCheckService
,HeartbeatMonitoringService
,HelixParticipationService
,IsolatedIngestionServer
,KafkaStoreIngestionService
,LeakedPushStatusCleanUpService
,LeakedResourceCleaner
,ListenerService
,MainIngestionMonitorService
,MainIngestionStorageMetadataService
,P2PBlobTransferService
,RemoteIngestionRepairService
,RouterHeartbeat
,RouterServer
,StorageEngineMetadataService
,StorageService
,StoreBackupVersionCleanupService
,StoreGraveyardCleanupService
,StoreValueSchemasCacheService
,SystemStoreRepairService
,TopicCleanupService
,UnusedValueSchemaCleanupService
,VeniceControllerService
public abstract class AbstractVeniceService extends java.lang.Object implements java.io.Closeable
Blueprint for all Services initiated from Venice Server
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractVeniceService.ServiceState
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
logger
protected java.util.concurrent.atomic.AtomicReference<AbstractVeniceService.ServiceState>
serviceState
-
Constructor Summary
Constructors Constructor Description AbstractVeniceService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
java.lang.String
getName()
boolean
isRunning()
void
start()
abstract boolean
startInner()
void
stop()
abstract void
stopInner()
-
-
-
Field Detail
-
logger
protected final org.apache.logging.log4j.Logger logger
-
serviceState
protected final java.util.concurrent.atomic.AtomicReference<AbstractVeniceService.ServiceState> serviceState
-
-
Method Detail
-
getName
public java.lang.String getName()
-
isRunning
public boolean isRunning()
-
start
public void start()
-
stop
public void stop() throws java.lang.Exception
- Throws:
java.lang.Exception
-
startInner
public abstract boolean startInner() throws java.lang.Exception
- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
serviceState
toAbstractVeniceService.ServiceState.STARTED
upon completion of the async work). - Throws:
java.lang.Exception
-
stopInner
public abstract void stopInner() throws java.lang.Exception
- Throws:
java.lang.Exception
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-