| | |
| | | static String MAX_RECEIVE_DELAY = "ds-cfg-max-receive-delay"; |
| | | static String MAX_SEND_QUEUE = "ds-cfg-max-send-queue"; |
| | | static String MAX_SEND_DELAY = "ds-cfg-max-send-delay"; |
| | | static String WINDOW_SIZE = "ds-cfg-window-size"; |
| | | |
| | | private static final StringConfigAttribute changelogStub = |
| | | new StringConfigAttribute(CHANGELOG_SERVER_ATTR, |
| | |
| | | configAttributes.add(maxSendDelayAttr); |
| | | } |
| | | |
| | | Integer window; |
| | | IntegerConfigAttribute windowStub = |
| | | new IntegerConfigAttribute(WINDOW_SIZE, "window size", |
| | | false, false, false, true, 0, false, 0); |
| | | IntegerConfigAttribute windowAttr = |
| | | (IntegerConfigAttribute) configEntry.getConfigAttribute(windowStub); |
| | | if (windowAttr == null) |
| | | window = 100; // Attribute is not present : use the default value |
| | | else |
| | | { |
| | | window = windowAttr.activeIntValue(); |
| | | configAttributes.add(windowAttr); |
| | | } |
| | | |
| | | configDn = configEntry.getDN(); |
| | | DirectoryServer.registerConfigurableComponent(this); |
| | | |
| | |
| | | try |
| | | { |
| | | broker = new ChangelogBroker(state, baseDN, serverId, maxReceiveQueue, |
| | | maxReceiveDelay, maxSendQueue, maxSendDelay); |
| | | maxReceiveDelay, maxSendQueue, maxSendDelay, window); |
| | | synchronized (broker) |
| | | { |
| | | broker.start(changelogServers); |
| | |
| | | */ |
| | | public int getPendingUpdatesCount() |
| | | { |
| | | synchronized (pendingChanges) |
| | | { |
| | | return pendingChanges.size(); |
| | | } |
| | | return pendingChanges.size(); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * Get the maximum receive window size. |
| | | * |
| | | * @return The maximum receive window size. |
| | | */ |
| | | public int getMaxRcvWindow() |
| | | { |
| | | return broker.getMaxRcvWindow(); |
| | | } |
| | | |
| | | /** |
| | | * Get the current receive window size. |
| | | * |
| | | * @return The current receive window size. |
| | | */ |
| | | public int getCurrentRcvWindow() |
| | | { |
| | | return broker.getCurrentRcvWindow(); |
| | | } |
| | | |
| | | /** |
| | | * Get the maximum send window size. |
| | | * |
| | | * @return The maximum send window size. |
| | | */ |
| | | public int getMaxSendWindow() |
| | | { |
| | | return broker.getMaxSendWindow(); |
| | | } |
| | | |
| | | /** |
| | | * Get the current send window size. |
| | | * |
| | | * @return The current send window size. |
| | | */ |
| | | public int getCurrentSendWindow() |
| | | { |
| | | return broker.getCurrentSendWindow(); |
| | | } |
| | | } |