001 /* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at 010 * docs/licenses/cddl.txt 011 * or http://www.opensource.org/licenses/cddl1.php. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * docs/licenses/cddl.txt. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2013-2014 UnboundID Corp. 026 */ 027 package com.unboundid.directory.sdk.common.types; 028 029 030 031 import com.unboundid.ldap.sdk.unboundidds.controls.AssuredReplicationLocalLevel; 032 import com.unboundid.ldap.sdk.unboundidds.controls. 033 AssuredReplicationRemoteLevel; 034 import com.unboundid.util.NotExtensible; 035 import com.unboundid.util.ThreadSafety; 036 import com.unboundid.util.ThreadSafetyLevel; 037 038 039 040 /** 041 * This interface may be used to obtain information about the assured 042 * replication requirements that will be used for an operation. 043 */ 044 @NotExtensible() 045 @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE) 046 public interface AssuredReplicationRequirements 047 { 048 /** 049 * Indicates whether assured replication processing will be performed for the 050 * operation. 051 * 052 * @return {@code true} if assured replication processing will be performed 053 * for the operation, or {@code false} if not. 054 */ 055 boolean isAssured(); 056 057 058 059 /** 060 * Retrieves the local assurance level that will be used for the operation. 061 * 062 * @return The local assurance level that will be used for the operation. 063 */ 064 AssuredReplicationLocalLevel getLocalLevel(); 065 066 067 068 /** 069 * Retrieves the remote assurance level that will be used for the operation. 070 * 071 * @return The remote assurance level that will be used for the operation. 072 */ 073 AssuredReplicationRemoteLevel getRemoteLevel(); 074 075 076 077 /** 078 * Retrieves the maximum length of time in milliseconds that the server should 079 * wait for assurance processing to complete before returning the operation 080 * result to the client. 081 * 082 * @return The maximum length of time in milliseconds that the server should 083 * wait for assurance processing to complete before returning the 084 * operation result to the client. 085 */ 086 long getTimeoutMillis(); 087 088 089 090 /** 091 * Indicates whether the operation response to the client will be delayed 092 * until replication assurance processing has completed or the timeout has 093 * occurred. 094 * 095 * @return {@code true} if the operation response to the client will be 096 * delayed until replication assurance processing has completed, or 097 * {@code false} if not. 098 */ 099 boolean isResponseDelayed(); 100 101 102 103 /** 104 * Indicates whether the assured replication requirements that will be used 105 * for the operation were altered by an assured replication request control 106 * included in the operation request from the client. 107 * 108 * @return {@code true} if the assured replication requirements have been 109 * altered by a request control provided by the client, or 110 * {@code false} if the assured replication requirements used for the 111 * operation are taken from a policy defined in the server 112 * configuration. 113 */ 114 boolean isAlteredByRequestControl(); 115 }