Skip to content

Commit

Permalink
fix: Move BacklogLocation enum to standalone file (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdiep committed Jul 2, 2021
1 parent ba3d576 commit 70749d8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 13 deletions.
10 changes: 10 additions & 0 deletions google-cloud-pubsublite/clirr-ignored-differences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!-- TODO: Remove on next release -->
<difference>
<differenceType>7005</differenceType>
<className>com/google/cloud/pubsublite/AdminClient</className>
<method>*</method>
<to>*</to>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/pubsublite/AdminClient*</className>
</difference>
<difference>
<differenceType>7006</differenceType>
<className>com/google/cloud/pubsublite/SubscriptionPath</className>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ static AdminClient create(AdminClientSettings settings) throws ApiException {
return settings.instantiate();
}

/**
* BacklogLoction refers to a location with respect to the message backlog.
*
* <p>BEGINNING refers to the location of the oldest retained message. END refers to the location
* past all currently published messages, skipping the entire message backlog.
*/
public enum BacklogLocation {
BEGINNING,
END
}

/** The Google Cloud region this client operates on. */
CloudRegion region();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.pubsublite;

/** BacklogLocation refers to a location with respect to the message backlog. */
public enum BacklogLocation {
/** BEGINNING refers to the location of the oldest retained message. */
BEGINNING,
/**
* END refers to the location past all currently published messages, skipping the entire message
* backlog.
*/
END
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.cloud.pubsublite.AdminClient;
import com.google.cloud.pubsublite.AdminClient.BacklogLocation;
import com.google.cloud.pubsublite.BacklogLocation;
import com.google.cloud.pubsublite.CloudRegion;
import com.google.cloud.pubsublite.LocationPath;
import com.google.cloud.pubsublite.ReservationPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.google.api.core.ApiFutures;
import com.google.api.gax.rpc.StatusCode.Code;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.pubsublite.AdminClient.BacklogLocation;
import com.google.cloud.pubsublite.BacklogLocation;
import com.google.cloud.pubsublite.CloudRegion;
import com.google.cloud.pubsublite.CloudZone;
import com.google.cloud.pubsublite.LocationPath;
Expand Down

0 comments on commit 70749d8

Please sign in to comment.