# Class ObserverBean

java.lang.Object
org.apache.zookeeper.server.ZooKeeperServerBean
org.apache.zookeeper.server.ObserverBean

All Implemented Interfaces:
  `ZKMBeanInfo, ObserverMXBean, ZooKeeperServerMXBean`

public class ObserverBean extends ZooKeeperServerBean implements ObserverMXBean
ObserverBean

## Field Summary

### Fields inherited from class ZooKeeperServerBean

`zks`

## Constructor Summary

Constructors
Constructor
Description
`ObserverBean(Observer observer, ZooKeeperServer zks)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getLearnerMaster()`
`String`
`getName()`
`int`
`getPendingRevalidationCount()`
`String`
`getQuorumAddress()`
`void`
`setLearnerMaster(String learnerMaster)`
requests the Observer switch to a new learner master

### Methods inherited from class ZooKeeperServerBean

`getAuthFailedCount, getAvgRequestLatency, getClientPort, getCommitProcMaxCommitBatchSize, getCommitProcMaxReadBatchSize, getConnectionDecreaseRatio, getConnectionDropDecrease, getConnectionDropIncrease, getConnectionFreezeTime, getConnectionMaxTokens, getConnectionTokenFillCount, getConnectionTokenFillTime, getDataDirSize, getFlushDelay, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastClientResponseSize, getLogDirSize, getMaxBatchSize, getMaxClientCnxnsPerHost, getMaxClientResponseSize, getMaxCnxns, getMaxRequestLatency, getMaxSessionTimeout, getMaxWriteQueuePollTime, getMinClientResponseSize, getMinRequestLatency, getMinSessionTimeout, getNonMTLSLocalConnCount, getNonMTLSRemoteConnCount, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getRequestStaleConnectionCheck, getRequestStaleLatencyCheck, getRequestThrottleDropStale, getRequestThrottleLimit, getRequestThrottleStallTime, getResponseCachingEnabled, getSecureClientAddress, getSecureClientPort, getStartTime, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getVersion, isHidden, resetAuthFailedCount, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetNonMTLSConnCount, resetStatistics, setCommitProcMaxCommitBatchSize, setCommitProcMaxReadBatchSize, setConnectionDecreaseRatio, setConnectionDropDecrease, setConnectionDropIncrease, setConnectionFreezeTime, setConnectionMaxTokens, setConnectionTokenFillCount, setConnectionTokenFillTime, setFlushDelay, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxBatchSize, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMaxWriteQueuePollTime, setMinSessionTimeout, setRequestStaleConnectionCheck, setRequestStaleLatencyCheck, setRequestThrottleDropStale, setRequestThrottleLimit, setRequestThrottleStallTime, setResponseCachingEnabled, setThrottledOpWaitTime, setTickTime`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface ZooKeeperServerMXBean

`getAuthFailedCount, getAvgRequestLatency, getClientPort, getCommitProcMaxCommitBatchSize, getCommitProcMaxReadBatchSize, getConnectionDecreaseRatio, getConnectionDropDecrease, getConnectionDropIncrease, getConnectionFreezeTime, getConnectionMaxTokens, getConnectionTokenFillCount, getConnectionTokenFillTime, getDataDirSize, getFlushDelay, getFsyncThresholdExceedCount, getJuteMaxBufferSize, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastClientResponseSize, getLogDirSize, getMaxBatchSize, getMaxClientCnxnsPerHost, getMaxClientResponseSize, getMaxCnxns, getMaxRequestLatency, getMaxSessionTimeout, getMaxWriteQueuePollTime, getMinClientResponseSize, getMinRequestLatency, getMinSessionTimeout, getNonMTLSLocalConnCount, getNonMTLSRemoteConnCount, getNumAliveConnections, getOutstandingRequests, getPacketsReceived, getPacketsSent, getRequestStaleConnectionCheck, getRequestStaleLatencyCheck, getRequestThrottleDropStale, getRequestThrottleLimit, getRequestThrottleStallTime, getResponseCachingEnabled, getSecureClientAddress, getSecureClientPort, getStartTime, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getVersion, resetAuthFailedCount, resetFsyncThresholdExceedCount, resetLatency, resetMaxLatency, resetNonMTLSConnCount, resetStatistics, setCommitProcMaxCommitBatchSize, setCommitProcMaxReadBatchSize, setConnectionDecreaseRatio, setConnectionDropDecrease, setConnectionDropIncrease, setConnectionFreezeTime, setConnectionMaxTokens, setConnectionTokenFillCount, setConnectionTokenFillTime, setFlushDelay, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxBatchSize, setMaxClientCnxnsPerHost, setMaxSessionTimeout, setMaxWriteQueuePollTime, setMinSessionTimeout, setRequestStaleConnectionCheck, setRequestStaleLatencyCheck, setRequestThrottleDropStale, setRequestThrottleLimit, setRequestThrottleStallTime, setResponseCachingEnabled, setThrottledOpWaitTime, setTickTime`

## Constructor Details

### ObserverBean

public ObserverBean(Observer observer, ZooKeeperServer zks)

## Method Details

### getName

public String getName()

Specified by:
  `getName` in interface `ZKMBeanInfo`
Overrides:
  `getName` in class `ZooKeeperServerBean`
Returns:
  a string identifying the MBean

### getPendingRevalidationCount

public int getPendingRevalidationCount()

Specified by:
  `getPendingRevalidationCount` in interface `ObserverMXBean`
Returns:
  count of pending revalidations

### getQuorumAddress

public String getQuorumAddress()

Specified by:
  `getQuorumAddress` in interface `ObserverMXBean`
Returns:
  socket address

### getLearnerMaster

public String getLearnerMaster()

Specified by:
  `getLearnerMaster` in interface `ObserverMXBean`
Returns:
  address of the current learner master

### setLearnerMaster

public void setLearnerMaster(String learnerMaster)
Description copied from interface: `ObserverMXBean`
requests the Observer switch to a new learner master

Specified by:
  `setLearnerMaster` in interface `ObserverMXBean`
Parameters:
  `learnerMaster` - address of the desired learner master