compress cluster state when publishing it

This commit is contained in:
kimchy 2011-03-24 01:12:36 +02:00
parent 992becf013
commit b28461dd0e
1 changed files with 6 additions and 1 deletions

View File

@ -48,12 +48,17 @@ public class PublishClusterStateAction extends AbstractComponent {
private final NewClusterStateListener listener;
private final boolean compesss;
public PublishClusterStateAction(Settings settings, TransportService transportService, DiscoveryNodesProvider nodesProvider,
NewClusterStateListener listener) {
super(settings);
this.transportService = transportService;
this.nodesProvider = nodesProvider;
this.listener = listener;
this.compesss = componentSettings.getAsBoolean("compress", true);
transportService.registerHandler(PublishClusterStateRequestHandler.ACTION, new PublishClusterStateRequestHandler());
}
@ -70,7 +75,7 @@ public class PublishClusterStateAction extends AbstractComponent {
}
transportService.sendRequest(node, PublishClusterStateRequestHandler.ACTION,
new PublishClusterStateRequest(clusterState),
TransportRequestOptions.options().withHighType(),
TransportRequestOptions.options().withHighType().withCompress(compesss),
new VoidTransportResponseHandler(ThreadPool.Names.SAME) {
@Override public void handleException(TransportException exp) {