public class UploadStrategySpecification extends java.lang.Object
OsmPrimitive
.
This includes:
UploadStrategy
to usegui.io
package)Modifier and Type | Field and Description |
---|---|
private int |
chunkSize |
private boolean |
closeChangesetAfterUpload |
private MaxChangesetSizeExceededPolicy |
policy |
private UploadStrategy |
strategy |
static int |
UNSPECIFIED_CHUNK_SIZE
indicates that the chunk size isn't specified
|
Constructor and Description |
---|
UploadStrategySpecification()
Creates a new upload strategy with default values.
|
UploadStrategySpecification(UploadStrategySpecification other)
Clones another upload strategy.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getChunkSize()
Gets the chunk size
|
int |
getNumRequests(int numObjects)
Gets the number of requests that will be required to upload the objects
|
MaxChangesetSizeExceededPolicy |
getPolicy()
Gets the policy that is used when the server max changeset size is exceeded.
|
UploadStrategy |
getStrategy()
Replies the upload strategy
|
static int |
getUnspecifiedChunkSize()
Gets a special value that is used to indicate that the chunk size was not specified
|
int |
hashCode() |
boolean |
isCloseChangesetAfterUpload()
Gets if the changeset should be closed after this upload
|
UploadStrategySpecification |
setChunkSize(int chunkSize)
Sets the upload chunk size
|
UploadStrategySpecification |
setCloseChangesetAfterUpload(boolean closeChangesetAfterUpload)
Sets whether to close the changeset after this upload
|
UploadStrategySpecification |
setPolicy(MaxChangesetSizeExceededPolicy policy)
Sets the policy to use when the max changeset size is exceeded
|
UploadStrategySpecification |
setStrategy(UploadStrategy strategy)
Sets the upload strategy (chunk mode)
|
public static final int UNSPECIFIED_CHUNK_SIZE
private UploadStrategy strategy
private int chunkSize
private MaxChangesetSizeExceededPolicy policy
private boolean closeChangesetAfterUpload
public UploadStrategySpecification()
public UploadStrategySpecification(UploadStrategySpecification other)
other
- the other upload strategypublic UploadStrategy getStrategy()
public int getChunkSize()
public static int getUnspecifiedChunkSize()
public MaxChangesetSizeExceededPolicy getPolicy()
public UploadStrategySpecification setStrategy(UploadStrategy strategy)
strategy
- The upload strategypublic UploadStrategySpecification setChunkSize(int chunkSize)
chunkSize
- The chunk sizepublic UploadStrategySpecification setPolicy(MaxChangesetSizeExceededPolicy policy)
policy
- The policypublic UploadStrategySpecification setCloseChangesetAfterUpload(boolean closeChangesetAfterUpload)
closeChangesetAfterUpload
- true
to close itpublic boolean isCloseChangesetAfterUpload()
true
to close itpublic int getNumRequests(int numObjects)
numObjects
- The number of objectspublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object